azure-identity
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Azure::Identity::AzureCliCredential Class Referencefinal

Enables authentication to Microsoft Entra ID 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.
 
 AzureCliCredential (Core::Credentials::TokenCredentialOptions const &options)
 Constructs an Azure CLI Credential.
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token.
 

Protected Attributes

_detail::TokenCache m_tokenCache
 The cache for the access token.
 
std::vector< std::string > m_additionallyAllowedTenants
 Additional tenants which will be allowed for this credential.
 
std::string m_tenantId
 The ID of the tenant to which the credential will authenticate by default.
 
DateTime::duration m_cliProcessTimeout
 The CLI process timeout.
 

Constructor & Destructor Documentation

◆ AzureCliCredential() [1/2]

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

◆ AzureCliCredential() [2/2]

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: