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

Chained Token Credential provides a token credential implementation which chains multiple Azure::Core::Credentials::TokenCredential implementations to be tried in order until one of the GetToken() methods returns an access token.

#include <chained_token_credential.hpp>

Inheritance diagram for Azure::Identity::ChainedTokenCredential:

Public Types

using Sources = std::vector< std::shared_ptr< Core::Credentials::TokenCredential > >
 A container type to store the ordered chain of credentials.
 

Public Member Functions

 ChainedTokenCredential (Sources sources)
 Constructs a Chained Token Credential. More...
 
 ~ChainedTokenCredential () override
 Destructs ChainedTokenCredential.
 
Core::Credentials::AccessToken GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
 Gets an authentication token. More...
 

Constructor & Destructor Documentation

◆ ChainedTokenCredential()

ChainedTokenCredential::ChainedTokenCredential ( ChainedTokenCredential::Sources  sources)
explicit
Parameters
sourcesThe ordered chain of Azure::Core::Credentials::TokenCredential implementations to try when calling GetToken().

Member Function Documentation

◆ GetToken()

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