Default Azure Credential combines multiple credentials that depend on the setup environment and require no parameters into a single chain. If the environment is set up sufficiently for at least one of such credentials to work, DefaultAzureCredential
will work as well.
More...
#include <default_azure_credential.hpp>
|
| DefaultAzureCredential () |
| Constructs DefaultAzureCredential .
|
|
| DefaultAzureCredential (Core::Credentials::TokenCredentialOptions const &options) |
| Constructs DefaultAzureCredential .
|
|
| ~DefaultAzureCredential () override |
| Destructs DefaultAzureCredential .
|
|
Core::Credentials::AccessToken | GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override |
| Gets an authentication token.
|
|
This credential is using several credentials in the following order: Azure::Identity::EnvironmentCredential, Azure::Identity::WorkloadIdentityCredential, Azure::Identity::AzureCliCredential, and Azure::Identity::ManagedIdentityCredential. Even though the credentials being used and their order is documented, it may be changed in the future versions of the SDK, potentially introducing breaking changes in its behavior.
- Note
- This credential is intended to be used at the early stages of development, to allow the developer some time to work with the other aspects of the SDK, and later to replace this credential with the exact credential that is the best fit for the application. It is not intended to be used in a production environment.
◆ DefaultAzureCredential() [1/2]
Azure::Identity::DefaultAzureCredential::DefaultAzureCredential |
( |
| ) |
|
|
inlineexplicit |
◆ DefaultAzureCredential() [2/2]
DefaultAzureCredential::DefaultAzureCredential |
( |
Core::Credentials::TokenCredentialOptions const & |
options | ) |
|
|
explicit |
- Parameters
-
options | Generic Token Credential Options. |
◆ ~DefaultAzureCredential()
DefaultAzureCredential::~DefaultAzureCredential |
( |
| ) |
|
|
overridedefault |
◆ GetToken()
AccessToken DefaultAzureCredential::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: