Constructs a new instance of the class with the provided session datasource.
The session datasource to use for data retrieval.
None
Represents the authorization status of a session.
Readonly
dataRepresents a persistent session data object. This property is read-only.
Clears the session by setting the authorization to null and clearing data asynchronously.
A promise that resolves once the session is cleared.
Asynchronously retrieves a public token by enqueuing a public key request.
A promise that resolves with the public token.
Retrieves the token for authorization, optionally revalidating it if needed.
Optional
revalidate: booleanFlag indicating whether to revalidate the token.
A promise that resolves to the token if valid, or null if revalidation is required.
Checks if the user is logged in by verifying the validity of the authorization token.
A boolean value indicating whether the user is logged in or not.
Asynchronously loads a session based on the provided parameters.
Optional
forceReload: booleanWhether to force a reload of the session.
Optional
optRedirectUrl: stringOptional redirect URL.
Optional
optExtraContext: anyOptional extra context data.
Sets the session data with the provided token and updates the authorization object.
The data object containing the token.
Represents a session with methods for managing user authentication and session data.