Administration API for Kerio Connect
Main Page
Related Pages
API Reference
IDL Files
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Groups
Pages
Session.idl
Go to the documentation of this file.
1
/**
2
* @file Session.idl
3
* @brief Work with the user session. Log in/out etc.
4
*
5
* @author Dusan Juhas, Frantisek Boranek
6
*
7
* @copyright Copyright © 2017 Kerio Technologies s.r.o.
8
*/
9
10
#import <kerio/web/idl/SharedStructures.idl>
11
#import <
common.idl
>
//SettingQuery
12
#import <
Users.idl
>
13
#import <
Domains.idl
>
14
15
module kerio {
16
module jsonapi {
17
module admin {
18
19
20
/**
21
* Details of the logged user into the administration.
22
*/
23
struct
AdminInfo
{
24
kerio::web::KId
id
;
///< ID of logged user
25
kerio::web::KId
domainId
;
///< ID of domain where user belongs to
26
string
loginName
;
///< loginName name
27
string
fullName
;
///< full name
28
UserRight
effectiveRole
;
///< the mightiest user role from role and groupRole
29
};
30
31
/**
32
* Currently logged user manager
33
*/
34
interface
Session
{
35
36
/**
37
* Get domain information of the currently logged user. Only name, displayName, ID, description and password policy related fields are filled.
38
*
39
* @param domain - domain properties
40
*/
41
void
getDomain(out
Domain
domain);
42
43
/**
44
* Obtain currently logged user's settings.
45
*
46
* @param settings - WAM settings
47
*/
48
void
getSettings(out jsonstring settings, in SettingQuery query);
49
50
/**
51
* Log in a given user.
52
* Please note that with a session to one module you cannot use another one (eg. with admin session you cannot use webmail).
53
*
54
* @param token - CSRF attack prevention token, use it as X-Token HTTP header
55
* @param userName - login name + domain name (can be omitted if primary) of the user to be logged in, e.g. "jdoe" or "jdoe@company.com"
56
* @param password - password of the user to be logged in
57
* @param application - client application description
58
*/
59
[KLoginMethod]
60
void
login(out
string
token, in
string
userName, in
string
password, in
kerio::web::ApiApplication
application);
61
62
/**
63
* Log out the callee.
64
*/
65
[KLogoutMethod]
66
void
logout(out
string
redirectUrl);
67
68
/**
69
* Set settings of the currently logged user.
70
*
71
* @param settings - WAM settings
72
*/
73
void
setSettings(in jsonstring settings);
74
75
/**
76
* Determines the currently logged user (caller, e.g. administrator).
77
* Fields id and domainId can be empty if built-in administrator is logged-in.
78
*
79
* @param userDetails - details about the currently logged user
80
*/
81
void
whoAmI(out
AdminInfo
userDetails);
82
};
83
84
}; }; };
//end of namespace
©
Kerio Technologies s.r.o.
, all rights reserved.