13#include <azure/core/credentials/credentials.hpp>
14#include <azure/core/credentials/token_credential_options.hpp>
15#include <azure/core/datetime.hpp>
21namespace Azure {
namespace Identity {
38 = std::chrono::seconds(13);
53#if !defined(_azure_TESTING_BUILD)
56 :
public Core::Credentials::TokenCredential {
72 Core::Credentials::TokenCredentialOptions
const& options,
74 DateTime::duration cliProcessTimeout,
75 std::vector<std::string> additionallyAllowedTenants);
77 void ThrowIfNotSafeCmdLineInput(
78 std::string
const& input,
79 std::string
const& allowedChars,
80 std::string
const& description)
const;
105 Core::Credentials::AccessToken
GetToken(
106 Core::Credentials::TokenRequestContext
const& tokenRequestContext,
107 Core::Context
const& context)
const override;
109#if !defined(_azure_TESTING_BUILD)
114 virtual std::string GetAzCommand(std::string
const& scopes, std::string
const& tenantId)
const;
115 virtual int GetLocalTimeToUtcDiffSeconds()
const;
Enables authentication to Microsoft Entra ID using Azure CLI to obtain an access token.
Definition azure_cli_credential.hpp:56
Core::Credentials::AccessToken GetToken(Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
Gets an authentication token.
Definition azure_cli_credential.cpp:160
std::vector< std::string > m_additionallyAllowedTenants
Additional tenants which will be allowed for this credential.
Definition azure_cli_credential.hpp:62
_detail::TokenCache m_tokenCache
The cache for the access token.
Definition azure_cli_credential.hpp:59
std::string m_tenantId
The ID of the tenant to which the credential will authenticate by default.
Definition azure_cli_credential.hpp:65
DateTime::duration m_cliProcessTimeout
The CLI process timeout.
Definition azure_cli_credential.hpp:68
Options for configuring the Azure::Identity::AzureCliCredential.
Definition azure_cli_credential.hpp:26
std::string TenantId
The ID of the tenant to which the credential will authenticate by default. If not specified,...
Definition azure_cli_credential.hpp:32
std::vector< std::string > AdditionallyAllowedTenants
For multi-tenant applications, specifies additional tenants for which the credential may acquire toke...
Definition azure_cli_credential.hpp:45
DateTime::duration CliProcessTimeout
The CLI process timeout.
Definition azure_cli_credential.hpp:38