Class EnvironmentCredential

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

public class EnvironmentCredential extends Object implements com.azure.core.credential.TokenCredential
A credential provider that provides token credentials based on environment variables. The environment variables expected are:
  • AZURE_CLIENT_ID
  • AZURE_CLIENT_SECRET
  • AZURE_TENANT_ID
or:
  • AZURE_CLIENT_ID
  • AZURE_CLIENT_CERTIFICATE_PATH
  • AZURE_CLIENT_CERTIFICATE_PASSWORD
  • AZURE_TENANT_ID
or:
  • AZURE_CLIENT_ID
  • AZURE_USERNAME
  • AZURE_PASSWORD
  • AZURE_TENANT_ID
  • Method Details

    • getToken

      public Mono<com.azure.core.credential.AccessToken> getToken(com.azure.core.credential.TokenRequestContext request)
      Specified by:
      getToken in interface com.azure.core.credential.TokenCredential
    • getTokenSync

      public com.azure.core.credential.AccessToken getTokenSync(com.azure.core.credential.TokenRequestContext request)
      Specified by:
      getTokenSync in interface com.azure.core.credential.TokenCredential