Class SharedTokenCacheCredential

java.lang.Object
com.azure.identity.SharedTokenCacheCredential
All Implemented Interfaces:
com.azure.core.credential.TokenCredential

@Deprecated public class SharedTokenCacheCredential extends Object implements com.azure.core.credential.TokenCredential
Deprecated.
This credential was originally created to support authentication with Visual Studio. Since Visual Studio was the only application that wrote to this token cache, this credential has been deprecated in favor of other developer credentials like AzureCliCredential, AzureDeveloperCliCredential, AzurePowerShellCredential, or IntelliJCredential for local development scenarios.
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.

This credential is a legacy mechanism for authenticating clients using credentials provided to Visual Studio.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Mono<com.azure.core.credential.AccessToken>
    getToken(com.azure.core.credential.TokenRequestContext request)
    Deprecated.
    Gets token from shared token cache

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.core.credential.TokenCredential

    getTokenSync
  • Method Details

    • getToken

      public Mono<com.azure.core.credential.AccessToken> getToken(com.azure.core.credential.TokenRequestContext request)
      Deprecated.
      Gets token from shared token cache
      Specified by:
      getToken in interface com.azure.core.credential.TokenCredential