Package com.azure.identity
Class SharedTokenCacheCredential
java.lang.Object
com.azure.identity.SharedTokenCacheCredential
- All Implemented Interfaces:
TokenCredential
A credential provider that provides token credentials from the MSAL shared token cache.
Requires a username and client ID. If a username is not provided, then the
AZURE_USERNAME
environment variable will be used.-
Method Summary
Modifier and TypeMethodDescriptiongetToken
(TokenRequestContext request) Gets token from shared token cache
-
Method Details
-
getToken
Gets token from shared token cache- Specified by:
getToken
in interfaceTokenCredential
- Parameters:
request
- the details of the token request- Returns:
- a Publisher that emits a single access token
-