Session (session) - Axiom

The Session object provides methods and properties for the current user session. It is global, which means you can access this object from any script. It is instantiated as "session".


Contents

session._id

Description

session._id

(String) - The current user session's ID.

Also See...


session.cookie

Description

session.cookie

(Object) - Cookie representing the current user session's ID.

Also See...


session.data

Description

session.data

(Object) - Used to store session specific data during runtime.

Also See...


session.httpReferer

Description

session.httpReferer

(String) - The HTTP Referer for the current session.


Also See...


session.lastModified

Description

session.lastModified

(Date) - The time this user session was created, or a login/logout was performed on it.


Also See...


session.shoppingCart

Description

session.shoppingCart

(Object) - The data object used for storing shopping cart data.

Notes

Only available in Axiom Stack Enterprise.

Also See...


session.user

Description

session.user

(AxiomObject) - The currently authenticated User Axiom Object.

Also See...


session.clearShoppingCart()

Description

session.clearShoppingCart()

Clears the current session user's shopping cart.

Notes

Only available in Axiom Stack Enterprise.

Also See...


session.getCookie()

Description

session.getCookie()

Returns the cookie representing the current user session's ID.

Returns

(String) - The cookie representing the current user session's ID.

Also See...


session.getData()

Description

session.getData()

Returns the data Object used by session.data.

Returns

(Object) - Used to store session specific data during runtime.

Also See...


session.getHttpReferer()

Description

session.getHttpReferer()

Returns the HTTP Referer for the current session.

Returns

(String) - The HTTP Referer for the current session.

Also See...


session.getLastActive()

Description

session.getLastActive()

Returns the time of the last activity for this user session.

Returns

(Date) - Time of the last activity for this user session.

Also See...


session.getLastModified()

Description

session.getLastModified()

Returns the time this user session was created, or a login/logout was performed on it.

Returns

(Date) - The time this user session was created, or a login/logout was performed on it.

Also See...


session.getOnSince()

Description

session.onSince()

The time this user session was created.

Returns

(Date) - Returns the time this user session was created.

Also See...


session.getShoppingCart()

Description

session.getShoppingCart()

Returns the data object used for storing shopping cart data.

Returns

(Object) - The data object used for storing shopping cart data.

Notes

Only available in Axiom Stack Enterprise.

Also See...


session.getUser()

Description

session.getUser()

Returns the currently authenticated User Axiom Object.

Returns

(Axiom Object) - the currently authenticated User Axiom Object.

Also See...


session.get_id()

Description

session.get_id()

Returns the current user Session's ID.

Returns

(String) - The current user Session's ID.

Also See...


session.lastActive()

Description

session.lastActive()

Returns the time of the last activity for this user session.

Returns

(Date) - Time of the last activity for this user session.

Also See...


session.login()

Description

session.login(user)

Authenticates a user session, granting permissions based on the user Axiom Object passed in.

Parameters

  • user (Axiom Object) - The user Axiom Object to authenticate.

Also See...


session.logout()

Description

session.logout()

Logs a user out of the system, removing all permissions the previously authenticated user Axiom Object had.

Also See...


session.onSince()

Description

session.onSince()

The time this user session was created.

Returns

(Date) - Returns the time this user session was created.

Also See...


session.reset()

Description

session.reset()

Resets the current session, removing any data associated to it.


session.setHttpReferer()

Description

session.setHttpReferer(referer)

Sets the HTTP Referer. This is done automatically in the case of an unauthorized request.

Parameters

  • referer (String) - The HTTP Referer to set.

Also See...


session.touch()

Description

session.touch()

Renews the current session, avoiding a session timeout. Can be used to artificially keep a session alive.