Methods
-
Retrieve the current session ID.
Returns:
Type Description string Returns the current session ID. -
Retrieve data from the local session storage.
Name Type Description key
string optional The key to retrieve from the session data store. If omitted, all session data will be returned.
Returns:
Type Description * Returns the stored session data or null
if the given key wasn't found. -
Retrieve the current session token.
Returns:
Type Description string | null Returns the current session token or null
if not logged in. -
Set data in the local session storage.
Name Type Description key
string The key to set in the session data store.
value
* The value to store. It will be internally converted to JSON before being put in the session store.
Returns:
Type Description boolean Returns true
if the data could be stored orfalse
on error.