Raritan PX2/PX3 JSON-RPC API
Public Types | Public Member Functions | Public Attributes | List of all members
session::SessionManager_2_0_0 Interface Reference

Session manager interface More...

import"SessionManager.idl";

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_2_0_0 session, out string token)
 Open a new session. More...
 
Session_2_0_0 getCurrentSession ()
 Retrieve current session information. More...
 
vector< Session_2_0_0getSessions ()
 Retrieve all open sessions. More...
 
void closeSession (in int sessionId, in CloseReason reason)
 Close a session identified by its token. More...
 
void closeCurrentSession (in CloseReason reason)
 Close the current session. More...
 
void touchCurrentSession (in boolean userActivity)
 Reset the current session's idle timer. More...
 
vector< HistoryEntrygetSessionHistory ()
 Get previous session data for the current user. More...
 

Public Attributes

constant int ERR_ACTIVE_SESSION_EXCLUSIVE_FOR_USER = 1
 Session creation denied due to single login limitation.
 

Detailed Description

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.

Member Enumeration Documentation

◆ CloseReason

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.

Member Function Documentation

◆ closeCurrentSession()

void session::SessionManager_2_0_0::closeCurrentSession ( in CloseReason  reason)

Close the current session.

This call must be authenticated using a session token.

Parameters
reasonclose reason

◆ closeSession()

void session::SessionManager_2_0_0::closeSession ( in int  sessionId,
in CloseReason  reason 
)

Close a session identified by its token.

Parameters
sessionIdID of the session that should be closed
reasonclose reason

◆ getCurrentSession()

Session_2_0_0 session::SessionManager_2_0_0::getCurrentSession ( )

Retrieve current session information.

This call must be authenticated using a session token.

Returns
Session information

◆ getSessionHistory()

vector<HistoryEntry> session::SessionManager_2_0_0::getSessionHistory ( )

Get previous session data for the current user.

Returns
History data, sorted from newer to older sessions

◆ getSessions()

vector<Session_2_0_0> session::SessionManager_2_0_0::getSessions ( )

Retrieve all open sessions.

Returns
List of sessions

◆ newSession()

int session::SessionManager_2_0_0::newSession ( out Session_2_0_0  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.

Parameters
sessionSession information
tokenReturned token for the newly created session
Returns
0 if OK
1 if session creation was denied due to single login limitation

◆ touchCurrentSession()

void session::SessionManager_2_0_0::touchCurrentSession ( in boolean  userActivity)

Reset the current session's idle timer.

Parameters
userActivityIndicates 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.


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