Credential
Convenience object that wraps a Token, providing methods and properties for interacting with credential resources.
This class can be used as a convenience mechanism for managing stored credentials, performing operations on or for a user using their credentials, and interacting with resources scoped to the credential.
Functions
Returns an Interceptor that can be can be added to an OkHttpClient via OkHttpClient.Builder.addInterceptor to access a Resource Server.
Removes this Credential from the associated CredentialDataSource. Also, sets the Token to null
. This Credential should not be used after it's been removed.
Checks to see if the current access token is valid, and if it is, returns it. If there is no Token associated with the Credential, null is returned.
Performs the OIDC User Info call, which returns claims associated with this Credential.
Returns a valid access token if one is present. If the access token is invalid, and there is a refresh token, a Token refresh is attempted via Credential.refreshToken. If the refresh results in a valid access token, it is returned.
Retrieve the Jwt associated with the Token.idToken field.
Performs a call to the Authorization Server to validate the specified TokenType.
Attempt to refresh the Token associated with this Credential.
Attempt to revoke the specified TokenType.
Returns the scopes associated with the associated Token if present, otherwise the default scopes associated with the OidcClient.
Store a token, or update the existing token. This can also be used to store custom tags.