azure-identity
default_azure_credential.hpp
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // SPDX-License-Identifier: MIT
3 
9 #pragma once
10 
11 #include <azure/core/credentials/credentials.hpp>
12 #include <azure/core/credentials/token_credential_options.hpp>
13 
14 #include <memory>
15 
16 namespace Azure { namespace Identity {
17  namespace _detail {
18  class ChainedTokenCredentialImpl;
19  }
20 
38  class DefaultAzureCredential final : public Core::Credentials::TokenCredential {
39  public:
45  : DefaultAzureCredential(Core::Credentials::TokenCredentialOptions{}){};
46 
52  explicit DefaultAzureCredential(Core::Credentials::TokenCredentialOptions const& options);
53 
59 
68  Core::Credentials::AccessToken GetToken(
69  Core::Credentials::TokenRequestContext const& tokenRequestContext,
70  Core::Context const& context) const override;
71 
72  private:
73  std::unique_ptr<_detail::ChainedTokenCredentialImpl> m_impl;
74  };
75 
76 }} // namespace Azure::Identity
Default Azure Credential combines multiple credentials that depend on the setup environment and requi...
Definition: default_azure_credential.hpp:38
DefaultAzureCredential()
Constructs DefaultAzureCredential.
Definition: default_azure_credential.hpp:44
Core::Credentials::AccessToken GetToken(Core::Credentials::TokenRequestContext const &tokenRequestContext, Core::Context const &context) const override
Gets an authentication token.
Definition: default_azure_credential.cpp:51
~DefaultAzureCredential() override
Destructs DefaultAzureCredential.
DefaultAzureCredential(Core::Credentials::TokenCredentialOptions const &options)
Constructs DefaultAzureCredential.
Azure SDK abstractions.
Definition: azure_cli_credential.hpp:22