11#include "azure/identity/detail/client_credential_core.hpp"
14#include <azure/core/credentials/credentials.hpp>
15#include <azure/core/credentials/token_credential_options.hpp>
16#include <azure/core/internal/unique_handle.hpp>
17#include <azure/core/url.hpp>
23namespace Azure {
namespace Identity {
25 class TokenCredentialImpl;
27 void FreePrivateKeyImpl(
void* pkey);
29 template <
typename>
struct UniquePrivateKeyHelper;
30 template <>
struct UniquePrivateKeyHelper<void*>
32 static void FreePrivateKey(
void* pkey) { FreePrivateKeyImpl(pkey); }
33 using type = Azure::Core::_internal::BasicUniqueHandle<void, FreePrivateKey>;
36 using UniquePrivateKey = Azure::Core::_internal::UniqueHandle<void*, UniquePrivateKeyHelper>;
55 std::string
AuthorityHost = _detail::DefaultOptionValues::GetAuthorityHost();
72 _detail::TokenCache m_tokenCache;
73 _detail::ClientCredentialCore m_clientCredentialCore;
74 std::unique_ptr<_detail::TokenCredentialImpl> m_tokenCredentialImpl;
75 std::string m_requestBody;
76 std::string m_tokenPayloadStaticPart;
77 std::string m_tokenHeaderEncoded;
78 _detail::UniquePrivateKey m_pkey;
82 std::string
const& clientId,
83 std::string
const& clientCertificatePath,
84 std::string
const& authorityHost,
85 std::vector<std::string> additionallyAllowedTenants,
86 Core::Credentials::TokenCredentialOptions
const& options);
99 std::string
const& clientId,
100 std::string
const& clientCertificatePath,
101 Core::Credentials::TokenCredentialOptions
const& options
102 = Core::Credentials::TokenCredentialOptions());
113 std::string tenantId,
114 std::string
const& clientId,
115 std::string
const& clientCertificatePath,
132 Core::Credentials::AccessToken
GetToken(
133 Core::Credentials::TokenRequestContext
const& tokenRequestContext,
134 Core::Context
const& context)
const override;
Client Certificate Credential authenticates with the Azure services using a Tenant ID,...
Definition client_certificate_credential.hpp:70
Core::Credentials::AccessToken GetToken(Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
Gets an authentication token.
Definition client_certificate_credential.cpp:471
~ClientCertificateCredential() override
Destructs ClientCertificateCredential.
Options for client certificate authentication.
Definition client_certificate_credential.hpp:44
std::vector< std::string > AdditionallyAllowedTenants
For multi-tenant applications, specifies additional tenants for which the credential may acquire toke...
Definition client_certificate_credential.hpp:62
std::string AuthorityHost
Authentication authority URL.
Definition client_certificate_credential.hpp:55