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) |
May be created only if user is authenticated (request contains valid cookie)
void webadmin::Session::confirmConfig | ( | out boolean | confirmed, |
in ClientTimestampList | clientTimestampList | ||
) |
Confirm the new configuration
confirmed | - true in case, that cut-off prevention was active and timestamp matched last provided timestamp |
clientTimestampList | - values obtained by getConfigTimestamp |
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
clientTimestampList | - is empty in case, that cut-off prevention is not active |
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
id | - id of interface or empty in case of localhost |
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.
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
type | - type of login |
void webadmin::Session::getSessionVariable | ( | in string | name, |
out string | value | ||
) |
Returns clients defined variable stored in configuration for logged user
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
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).
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 |
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
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
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
kerio::web::ApiException | -32001 Session expired. - "The user is not logged in." 1004 Access denied. - "Insufficient rights to perform the requested operation." |