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

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

#include <client_secret_credential.hpp>

Inheritance diagram for Azure::Identity::ClientSecretCredential:

Public Member Functions

 ClientSecretCredential (std::string const &tenantId, std::string const &clientId, std::string const &clientSecret, ClientSecretCredentialOptions const &options)
 Constructs a Client Secret Credential. More...
 
 ClientSecretCredential (std::string tenantId, std::string clientId, std::string clientSecret, Core::Credentials::TokenCredentialOptions const &options=Core::Credentials::TokenCredentialOptions())
 Constructs a Client Secret Credential. More...
 
 ~ClientSecretCredential () override
 Destructs ClientSecretCredential. More...
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ ClientSecretCredential() [1/2]

Azure::Identity::ClientSecretCredential::ClientSecretCredential ( std::string const &  tenantId,
std::string const &  clientId,
std::string const &  clientSecret,
ClientSecretCredentialOptions const &  options 
)
inlineexplicit
Parameters
tenantIdTenant ID.
clientIdClient ID.
clientSecretClient secret.
optionsOptions for token retrieval.

◆ ClientSecretCredential() [2/2]

Azure::Identity::ClientSecretCredential::ClientSecretCredential ( std::string  tenantId,
std::string  clientId,
std::string  clientSecret,
Core::Credentials::TokenCredentialOptions const &  options = Core::Credentials::TokenCredentialOptions() 
)
inlineexplicit
Parameters
tenantIdTenant ID.
clientIdClient ID.
clientSecretClient Secret.
optionsOptions for token retrieval.

◆ ~ClientSecretCredential()

ClientSecretCredential::~ClientSecretCredential ( )
overridedefault

Member Function Documentation

◆ GetToken()

Azure::Core::Credentials::AccessToken ClientSecretCredential::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: