TokenProviderManager
The TokenProviderManager interface provides the functionality to get the tokens, validate the tokens, refresh the tokens, and clear the tokens. This interface should be implemented by the TokenProviderManagerImpl class.
Functions
Clear the tokens from the token data store. This method will clear the tokens from the data store. After calling this method, developer needs to perform the authorization flow again to get the tokens.
Get the access token from the token.
Get the access token expiration time from the token.
Get the decoded ID token
Get the ID token from the token.
Get the refresh token from the token.
Perform an action with fresh tokens. This method will perform the action with fresh tokens and save the updated token state in the data store. Developer can directly use this method perform an action with fresh tokens, without worrying about refreshing the tokens. If this action fails, it will throw an Exception.
Perform refresh token grant. This method will perform the refresh token grant and save the updated token state in the data store. If refresh token grant fails, it will throw an Exception.
Validate the access token, by checking the expiration time of the access token, and by checking if the access token is null or empty.