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

Client Certificate Credential authenticates with the Azure services using a Tenant ID, Client ID and a client certificate. More...

#include <client_certificate_credential.hpp>

Inheritance diagram for Azure::Identity::ClientCertificateCredential:

Public Member Functions

 ClientCertificateCredential (std::string tenantId, std::string const &clientId, std::string const &clientCertificatePath, Core::Credentials::TokenCredentialOptions const &options=Core::Credentials::TokenCredentialOptions())
 Constructs a Client Certificate Credential.
 
 ClientCertificateCredential (std::string tenantId, std::string const &clientId, std::string const &clientCertificate, std::string const &privateKey, ClientCertificateCredentialOptions const &options={})
 Constructs a Client Certificate Credential.
 
 ClientCertificateCredential (std::string tenantId, std::string const &clientId, std::string const &clientCertificatePath, ClientCertificateCredentialOptions const &options)
 Constructs a Client Certificate Credential.
 
 ~ClientCertificateCredential () override
 Destructs ClientCertificateCredential.
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token.
 

Detailed Description

Constructor & Destructor Documentation

◆ ClientCertificateCredential() [1/3]

ClientCertificateCredential::ClientCertificateCredential ( std::string  tenantId,
std::string const &  clientId,
std::string const &  clientCertificatePath,
Core::Credentials::TokenCredentialOptions const &  options = Core::Credentials::TokenCredentialOptions() 
)
explicit
Parameters
tenantIdTenant ID.
clientIdClient ID.
clientCertificatePathThe path to a PEM file containing exactly one certificate which is used for signing along with its corresponding private key.
optionsOptions for token retrieval.

◆ ClientCertificateCredential() [2/3]

ClientCertificateCredential::ClientCertificateCredential ( std::string  tenantId,
std::string const &  clientId,
std::string const &  clientCertificate,
std::string const &  privateKey,
ClientCertificateCredentialOptions const &  options = {} 
)
explicit
Parameters
tenantIdTenant ID.
clientIdClient ID.
clientCertificateThe PEM encoded x509 certificate which is used for signing, in base64 string format, including the begin and end headers.
privateKeyThe PEM encoded representation of the corresponding RSA private key of the certificate.
optionsOptions for token retrieval.

◆ ClientCertificateCredential() [3/3]

ClientCertificateCredential::ClientCertificateCredential ( std::string  tenantId,
std::string const &  clientId,
std::string const &  clientCertificatePath,
ClientCertificateCredentialOptions const &  options 
)
explicit
Parameters
tenantIdTenant ID.
clientIdClient ID.
clientCertificatePathThe path to a PEM file containing exactly one certificate which is used for signing along with its corresponding private key.
optionsOptions for token retrieval.

◆ ~ClientCertificateCredential()

ClientCertificateCredential::~ClientCertificateCredential ( )
overridedefault

Member Function Documentation

◆ GetToken()

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