Credential which authenticates a Microsoft Entra service principal using a signed client assertion.
More...
#include <client_assertion_credential.hpp>
|
| ClientAssertionCredential (std::string tenantId, std::string clientId, std::function< std::string(Core::Context const &)> assertionCallback, ClientAssertionCredentialOptions const &options={}) |
| Creates an instance of the Client Assertion Credential with a callback that provides a signed client assertion to authenticate against Microsoft Entra ID.
|
|
| ~ClientAssertionCredential () override |
| Destructs ClientAssertionCredential .
|
|
Core::Credentials::AccessToken | GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override |
| Obtains an authentication token from Microsoft Entra ID, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication.
|
|
◆ ClientAssertionCredential()
ClientAssertionCredential::ClientAssertionCredential |
( |
std::string |
tenantId, |
|
|
std::string |
clientId, |
|
|
std::function< std::string(Core::Context const &)> |
assertionCallback, |
|
|
ClientAssertionCredentialOptions const & |
options = {} |
|
) |
| |
|
explicit |
- Parameters
-
tenantId | The Microsoft Entra tenant (directory) ID of the service principal. |
clientId | The client (application) ID of the service principal. |
assertionCallback | A callback returning a valid client assertion used to authenticate the service principal. |
options | Options that allow to configure the management of the requests sent to Microsoft Entra ID for token retrieval. |
◆ ~ClientAssertionCredential()
ClientAssertionCredential::~ClientAssertionCredential |
( |
| ) |
|
|
overridedefault |
◆ GetToken()
AccessToken ClientAssertionCredential::GetToken |
( |
Core::Credentials::TokenRequestContext const & |
tokenRequestContext, |
|
|
Core::Context const & |
context |
|
) |
| const |
|
override |
- Parameters
-
tokenRequestContext | A context to get the token in. |
context | A context to control the request lifetime. |
- Exceptions
-
Azure::Core::Credentials::AuthenticationException | Authentication error occurred. |
The documentation for this class was generated from the following files: