SessionHandler Class
Responsible for managing user sessions
Item Index
Methods
- close
- create
- end
- getClientId static
- getSessionCookie static
- getSessionIdFromCookie static
- getSessionStore static
- getSessionStore static
- open
- shutdown
- start
Properties
- COOKIE_HEADER static
- COOKIE_NAME static
- HANDLER_PATH static
- HANDLER_SUFFIX static
- SID_KEY static
- TIMEOUT_KEY static
Methods
close
-
session
-
cb
Closes the session and persists it when no other requests are currently accessing the session.
Parameters:
-
session
Object -
cb
Function
create
-
request
Creates the shell of a session object
Parameters:
-
request
Object
Returns:
Session
end
-
session
-
cb
Sets the session in a state that it should be terminated after the last request has completed.
Parameters:
-
session
Object -
cb
Function
getClientId
-
request
Generates a unique client ID based on the user agent and the remote address.
Parameters:
-
request
Object
Returns:
Unique Id
getSessionCookie
-
session
Parameters:
-
session
Object
Returns:
getSessionIdFromCookie
-
request
Extracts the session id from the returned cookie
Parameters:
-
request
ObjectThe object that describes the incoming user request
Returns:
Session Id if available NULL if it cannot be found
getSessionStore
()
Function
static
Loads a session store prototype based on the system configuration
Returns:
getSessionStore
()
SessionStore
static
Retrieves an instance of the SessionStore specified in the sytem configuration
Returns:
open
-
request
-
cb
Retrieves a session for the current request. When the session ID is available the existing session is retrieved otherwise a new session is created.
Parameters:
-
request
ObjectThe request descriptor
-
cb
FunctionThe callback(ERROR, SESSION_OBJ)
shutdown
-
cb
Shuts down the sesison handler and the associated session store
Parameters:
-
cb
Function
start
-
cb
Parameters:
-
cb
Function