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 . More...
|
|
| ~DefaultAzureCredential () override |
| Destructs DefaultAzureCredential .
|
|
Core::Credentials::AccessToken | GetToken (Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override |
| Gets an authentication token. More...
|
|
This credential is using several credentials in the following order: #EnvironmentCredential, #AzureCliCredential, and #ManagedIdentityCredential. Even though the credentials being used and their order is documented, it may be changed in the future versions of the SDK, potentially bringing 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()
Azure::Identity::DefaultAzureCredential::DefaultAzureCredential |
( |
Core::Credentials::TokenCredentialOptions const & |
options | ) |
|
|
explicit |
- Parameters
-
options | Generic Token Credential Options. |
◆ 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: