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

Attempts authentication using a managed identity that has been assigned to the deployment environment. This authentication type works in Azure VMs, App Service and Azure Functions applications, as well as the Azure Cloud Shell. More information about configuring managed identities can be found here: https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview.

#include <managed_identity_credential.hpp>

Inheritance diagram for Azure::Identity::ManagedIdentityCredential:

Public Member Functions

 ~ManagedIdentityCredential () override
 Destructs TokenCredential.
 
 ManagedIdentityCredential (std::string const &clientId=std::string(), Azure::Core::Credentials::TokenCredentialOptions const &options=Azure::Core::Credentials::TokenCredentialOptions())
 Constructs a Managed Identity Credential.
 
 ManagedIdentityCredential (Azure::Identity::ManagedIdentityCredentialOptions const &options)
 Constructs a Managed Identity Credential.
 
 ManagedIdentityCredential (Azure::Core::Credentials::TokenCredentialOptions const &options)
 Constructs a Managed Identity Credential.
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token.
 

Constructor & Destructor Documentation

◆ ~ManagedIdentityCredential()

ManagedIdentityCredential::~ManagedIdentityCredential ( )
overridedefault

◆ ManagedIdentityCredential() [1/3]

ManagedIdentityCredential::ManagedIdentityCredential ( std::string const &  clientId = std::string(),
Azure::Core::Credentials::TokenCredentialOptions const &  options = Azure::Core::Credentials::TokenCredentialOptions() 
)
explicit
Parameters
clientIdClient ID.
optionsOptions for token retrieval.

◆ ManagedIdentityCredential() [2/3]

ManagedIdentityCredential::ManagedIdentityCredential ( Azure::Identity::ManagedIdentityCredentialOptions const &  options)
explicit
Parameters
optionsOptions for token retrieval.

◆ ManagedIdentityCredential() [3/3]

ManagedIdentityCredential::ManagedIdentityCredential ( Azure::Core::Credentials::TokenCredentialOptions const &  options)
explicit
Parameters
optionsOptions for token retrieval.

Member Function Documentation

◆ GetToken()

Azure::Core::Credentials::AccessToken ManagedIdentityCredential::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.
Returns
Authentication token.
Exceptions
Azure::Core::Credentials::AuthenticationExceptionAuthentication error occurred.

The documentation for this class was generated from the following files: