import "Session.idl";
Public Member Functions | |
void | getDomain (out Domain domain) |
void | getSettings (out jsonstring settings, in SettingQuery query) |
void | login (out string token, in string userName, in string password, in kerio::web::ApiApplication application) |
void | logout (out string redirectUrl) |
void | setSettings (in jsonstring settings) |
void | whoAmI (out AdminInfo userDetails) |
Currently logged user manager
void kerio::jsonapi::admin::Session::getDomain | ( | out Domain | domain | ) |
Get domain information of the currently logged user. Only name, displayName, ID, description and password policy related fields are filled.
domain | - domain properties |
void kerio::jsonapi::admin::Session::getSettings | ( | out jsonstring | settings, |
in SettingQuery | query | ||
) |
Obtain currently logged user's settings.
settings | - WAM settings |
void kerio::jsonapi::admin::Session::login | ( | out string | token, |
in string | userName, | ||
in string | password, | ||
in kerio::web::ApiApplication | application | ||
) |
Log in a 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) 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 |
void kerio::jsonapi::admin::Session::logout | ( | out string | redirectUrl | ) |
Log out the callee.
void kerio::jsonapi::admin::Session::setSettings | ( | in jsonstring | settings | ) |
Set settings of the currently logged user.
settings | - WAM settings |
void kerio::jsonapi::admin::Session::whoAmI | ( | out AdminInfo | userDetails | ) |
Determines the currently logged user (caller, e.g. administrator). Fields id and domainId can be empty if built-in administrator is logged-in.
userDetails | - details about the currently logged user |