Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
|
Session manager interface More...
Public Types | |
enum | CloseReason { CLOSE_REASON_LOGOUT , CLOSE_REASON_TIMEOUT , CLOSE_REASON_BROWSER_CLOSED , CLOSE_REASON_FORCED_DISCONNECT } |
Session close reasons More... | |
Public Member Functions | |
int | newSession (out Session session, out string token) |
Open a new session. | |
Session | getCurrentSession () |
Retrieve current session information. | |
vector< Session > | getSessions () |
Retrieve all open sessions. | |
void | closeSession (in int sessionId, in CloseReason reason) |
Close a session identified by its token. | |
void | closeCurrentSession (in CloseReason reason) |
Close the current session. | |
void | touchCurrentSession (in boolean userActivity) |
Reset the current session's idle timer. | |
vector< HistoryEntry > | getSessionHistory () |
Get previous session data for the current user. | |
Public Attributes | |
constant int | ERR_ACTIVE_SESSION_EXCLUSIVE_FOR_USER = 1 |
Session creation denied due to single login limitation. | |
Session manager interface
Session manager allows clients to announce a user session, i.e. consecutive activity that is related to each other, and make use of session services. Depending on transport protocoll an established session allows simplified authentication using the session token. For instance, for HTTP transport implementation sessiontoken can be written into HTTP Header while other authentication schemes may be omitted (for details, see transport mapping documentation). Each session has a defined timeout and an idle timer. A session is deleted once idle time is equal or greater than session timeout. Idle timer is implicitely touched by transport implementation whenever a call arrives that can be mapped to a particular session. In addition a client may decide to call touchCurrentSession with userActivity flag set to true. In this case userIdle attribute of session is reset to 0. This has purely informational character and will not cause any further action of session manager. It may be used to determine user activity under the assumptions that clients may do frequent background calls without actual user activity.
Definition at line 54 of file SessionManager.idl.
Session close reasons
Enumerator | |
---|---|
CLOSE_REASON_LOGOUT | Regular logout. |
CLOSE_REASON_TIMEOUT | Session timed out. |
CLOSE_REASON_BROWSER_CLOSED | Browser window was closed. |
CLOSE_REASON_FORCED_DISCONNECT | Session was forcibly closed. |
Definition at line 59 of file SessionManager.idl.
void session::SessionManager::closeCurrentSession | ( | in CloseReason | reason | ) |
Close the current session.
This call must be authenticated using a session token.
reason | close reason |
void session::SessionManager::closeSession | ( | in int | sessionId, |
in CloseReason | reason | ||
) |
Close a session identified by its token.
sessionId | ID of the session that should be closed |
reason | close reason |
Session session::SessionManager::getCurrentSession | ( | ) |
Retrieve current session information.
This call must be authenticated using a session token.
vector< HistoryEntry > session::SessionManager::getSessionHistory | ( | ) |
Get previous session data for the current user.
vector< Session > session::SessionManager::getSessions | ( | ) |
Retrieve all open sessions.
int session::SessionManager::newSession | ( | out Session | session, |
out string | token | ||
) |
Open a new session.
This function will create a new session for the authenticated user. Upon success it will return a session token which can be used to authenticate future requests.
session | Session information |
token | Returned token for the newly created session |
void session::SessionManager::touchCurrentSession | ( | in boolean | userActivity | ) |
Reset the current session's idle timer.
userActivity | Indicates that the session is touched due to user activity. |
If userActivity is not set, this is internally a NOP since any RPC call will implicitly touch the session. This call must be authenticated using a session token.
constant int session::SessionManager::ERR_ACTIVE_SESSION_EXCLUSIVE_FOR_USER = 1 |
Session creation denied due to single login limitation.
Definition at line 56 of file SessionManager.idl.