All Classes Files Functions Variables Pages
webadmin::Session Interface Reference

import"Session.idl";

Public Member Functions

void getCsrfToken (out string token)
 
void getUserName (out string name)
 
void login (out string token, in string userName, in string password, in ApiApplication application)
 
void logout ()
 
void getSessionVariable (in string name, out string value)
 
void setSessionVariable (in string name, in string value)
 
void reset ()
 
void getConfigTimestamp (out ClientTimestampList clientTimestampList)
 
void confirmConfig (out boolean confirmed, in ClientTimestampList clientTimestampList)
 
void getConnectedInterface (out kerio::web::KId id)
 
void getLoginType (out LoginType type)
 

Detailed Description

May be created only if user is authenticated (request contains valid cookie)

Member Function Documentation

void webadmin::Session::confirmConfig ( out boolean  confirmed,
in ClientTimestampList  clientTimestampList 
)

Confirm the new configuration

Parameters
confirmed- true in case, that cut-off prevention was active and timestamp matched last provided timestamp
clientTimestampList- values obtained by getConfigTimestamp
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::getConfigTimestamp ( out ClientTimestampList  clientTimestampList)

Reloads configuration and returns timestamp of current configuration

Parameters
clientTimestampList- is empty in case, that cut-off prevention is not active
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::getConnectedInterface ( out kerio::web::KId  id)

Returns id of interface through which is client connected to server

Parameters
id- id of interface or empty in case of localhost
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::getCsrfToken ( out string  token)

Retrieves an unique session ID intended to be used for CSRF protection in web forms.
This ID is different from the session cookie but also remains the same during the session lifetime.

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::getLoginType ( out LoginType  type)

Returns type of login, that has to be performed

Parameters
type- type of login
void webadmin::Session::getSessionVariable ( in string  name,
out string  value 
)

Returns clients defined variable stored in configuration for logged user

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::getUserName ( out string  name)

Retrieves name os logged user

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::login ( out string  token,
in string  userName,
in string  password,
in ApiApplication  application 
)

Log in given user.

Please note that with a session to one module you cannot use another one (eg. with admin session you cannot use webmail).

Parameters
token- CSRF attack prevention token, use it as X-Token HTTP header
userName- login name + domain name (can be omitted if primary/local) of the user to be logged in, e.g. "jdoe" or "jdoe@company.com"
password- password of the user to be logged in
application- client application description
Exceptions
kerio::web::ApiException
1000 Operation failed. - "Username or password is not correct."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::logout ( )

destroys session

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::reset ( )

reset all persistent objects (managers) in session

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Session::setSessionVariable ( in string  name,
in string  value 
)

Stores clients defined variable to configuration for logged user

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."

The documentation for this interface was generated from the following file: