azure-identity
Public Member Functions | List of all members
Azure::Identity::EnvironmentCredential Class Referencefinal

Environment Credential initializes an Azure credential, based on the system environment variables being set. More...

#include <environment_credential.hpp>

Inheritance diagram for Azure::Identity::EnvironmentCredential:

Public Member Functions

 EnvironmentCredential (Azure::Core::Credentials::TokenCredentialOptions options=Azure::Core::Credentials::TokenCredentialOptions())
 Constructs an Environment Credential. More...
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ EnvironmentCredential()

EnvironmentCredential::EnvironmentCredential ( Azure::Core::Credentials::TokenCredentialOptions  options = Azure::Core::Credentials::TokenCredentialOptions())
explicit
Parameters
optionsOptions for token retrieval.
Note
May read from the following environment variables:
  • AZURE_TENANT_ID
  • AZURE_CLIENT_ID
  • AZURE_CLIENT_SECRET
  • AZURE_CLIENT_CERTIFICATE_PATH
  • AZURE_USERNAME
  • AZURE_PASSWORD

Member Function Documentation

◆ GetToken()

Azure::Core::Credentials::AccessToken EnvironmentCredential::GetToken ( Core::Credentials::TokenRequestContext const &  tokenRequestContext,
Core::Context const &  context 
) const
override
Parameters
tokenRequestContextA context to get the token in.
contextA context to control the request lifetime.
Exceptions
Azure::Core::Credentials::AuthenticationExceptionAuthentication error occurred.

The documentation for this class was generated from the following files: