TokenManager

interface TokenManager

Interface to Manage OAuth2 Tokens

Inheritors

Functions

Link copied to clipboard
abstract fun clear()
Remove the stored AccessToken
Link copied to clipboard
abstract fun exchangeToken(token: SSOToken, additionalParameters: Map<String, String>, listener: FRListener<AccessToken>)
abstract fun exchangeToken(code: String, pkce: PKCE, additionalParameters: Map<String, String>, listener: FRListener<AccessToken>)
Sends an authorization request to the authorization service.
Link copied to clipboard
abstract fun getAccessToken(accessTokenVerifier: AccessTokenVerifier, tokenListener: FRListener<AccessToken>)
Get the AccessToken asynchronously, If the stored AccessToken is expired, auto refresh the token
Link copied to clipboard
abstract fun hasToken(): Boolean
Check if token exists in the storage.
Link copied to clipboard
abstract fun persist(token: AccessToken)
Persist the AccessToken to storage
Link copied to clipboard
abstract fun refresh(accessToken: AccessToken, listener: FRListener<AccessToken>)
Refresh the AccessToken asynchronously, force token refresh, no matter the stored AccessToken is expired or not refresh the token and persist it.
Link copied to clipboard
abstract fun revoke(listener: FRListener<Void>)
OAuth2 Token Revocation