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 keystring 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 nullif the given key wasn't found. -
Retrieve the current session token.
Returns:
Type Description string | null Returns the current session token or nullif not logged in. -
Set data in the local session storage.
Name Type Description keystring 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 trueif the data could be stored orfalseon error.