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

Enables authentication to Azure Active Directory using Azure CLI to obtain an access token.

#include <azure_cli_credential.hpp>

Inheritance diagram for Azure::Identity::AzureCliCredential:

Public Member Functions

 AzureCliCredential (AzureCliCredentialOptions const &options={})
 Constructs an Azure CLI Credential. More...
 
 AzureCliCredential (Core::Credentials::TokenCredentialOptions const &options)
 Constructs an Azure CLI Credential. More...
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token. More...
 

Protected Attributes

_detail::TokenCache m_tokenCache
 
std::vector< std::string > m_additionallyAllowedTenants
 
std::string m_tenantId
 
DateTime::duration m_cliProcessTimeout
 

Constructor & Destructor Documentation

◆ AzureCliCredential() [1/2]

AzureCliCredential::AzureCliCredential ( AzureCliCredentialOptions const &  options = {})
explicit
Parameters
optionsOptions for token retrieval.

◆ AzureCliCredential() [2/2]

Azure::Identity::AzureCliCredential::AzureCliCredential ( Core::Credentials::TokenCredentialOptions const &  options)
explicit
Parameters
optionsOptions for token retrieval.

Member Function Documentation

◆ GetToken()

AccessToken AzureCliCredential::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: