Credential
Index
Constructors
constructor
Returns Credential
Properties
readonlyoauth2
OAuth2 client for performing operations related to the user's token.
readonlytoken
The token this credential represents.
Methods
introspect
Introspects the given token to retrieve information about it.
Parameters
tokenType: TokenType
The type of the token to introspect.
Returns Promise<TokenInfo>
A promise that resolves to the token information.
refresh
Attempt to refresh the token.
Returns Promise<void>
userInfo
Fetches the user info for this user.
In addition to passing the result to the provided completion block, a successful request will result in the
`UserInfo`property being set with the new value for later use.Returns Promise<UserInfo>
Convenience object that provides methods and properties for using a user's authentication tokens.
Once a user is authenticated within an application, the tokens' lifecycle must be managed to ensure it is properly refreshed as needed, is stored in a secure manner, and can be used to perform requests on behalf of the user. This class provides capabilities to accomplish all these tasks, while ensuring a convenient developer experience.