AuthorizationManager

AuthorizationManager is a singleton object that manages the authorization state of the user. It provides methods to initialize the authorization manager, check if the user is authenticated, retrieve access tokens, refresh access tokens, and clear the authorization state.

AuthorizationManager uses a TokenManager to manage the access tokens and a Storage implementation to store the authorization state.

See also

Functions

Link copied to clipboard

Clears the state of the authorization.

Link copied to clipboard
fun dispose()

Clears the state of the authorization manager.

Link copied to clipboard
suspend fun freshAccessToken(context: ERROR CLASS: Symbol not found for Context, force: Boolean = false): String?

Retrieves a fresh access token.

Link copied to clipboard

Retrieves the access token from the token manager.

Link copied to clipboard

Retrieves the expiration time of the access token.

Link copied to clipboard

Retrieves the ID token associated with the authenticated user.

Link copied to clipboard

Retrieves and parses the ID token from the token manager.

Link copied to clipboard
fun initialize(configuration: AuthorizationConfiguration, storage: Storage? = null)

Initializes the authorization manager with the given configuration and optional storage.

Link copied to clipboard

Checks if the access token is expired.

Link copied to clipboard

Checks if the user is authenticated.

Link copied to clipboard

Retrieves the initialization status of the AuthorizationManager.

Link copied to clipboard
fun oAuth(context: ERROR CLASS: Symbol not found for Context): OAuthAuthorizationService

Creates an instance of the OAuthAuthorizationService using the provided context.

Link copied to clipboard

Reset the configuration.