EnvironmentCredential Class

  • java.lang.Object
    • com.azure.identity.EnvironmentCredential

Implements

public class EnvironmentCredential
implements 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 Summary

Modifier and Type Method and Description

Mono<AccessToken>

getToken(TokenRequestContext request)
AccessToken getTokenSync(TokenRequestContext request)

Methods inherited from java.lang.Object

Method Details

getToken

public Mono getToken(TokenRequestContext request)

Parameters:

request

getTokenSync

public AccessToken getTokenSync(TokenRequestContext request)

Parameters:

request

Applies to