Package com.azure.identity
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
AZURE_CLIENT_ID
AZURE_CLIENT_CERTIFICATE_PATH
AZURE_CLIENT_CERTIFICATE_PASSWORD
AZURE_TENANT_ID
AZURE_CLIENT_ID
AZURE_USERNAME
AZURE_PASSWORD
AZURE_TENANT_ID
-
Method Summary
Modifier and TypeMethodDescriptionMono<com.azure.core.credential.AccessToken>
getToken
(com.azure.core.credential.TokenRequestContext request) com.azure.core.credential.AccessToken
getTokenSync
(com.azure.core.credential.TokenRequestContext request)
-
Method Details
-
getToken
public Mono<com.azure.core.credential.AccessToken> getToken(com.azure.core.credential.TokenRequestContext request) - Specified by:
getToken
in interfacecom.azure.core.credential.TokenCredential
-
getTokenSync
public com.azure.core.credential.AccessToken getTokenSync(com.azure.core.credential.TokenRequestContext request) - Specified by:
getTokenSync
in interfacecom.azure.core.credential.TokenCredential
-