azure-identity
All Classes Files Functions Variables Typedefs Pages
client_assertion_credential_impl.hpp
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
9#pragma once
10
12#include "azure/identity/detail/client_credential_core.hpp"
15
16#include <string>
17
18namespace Azure { namespace Identity { namespace _detail {
19 class TokenCredentialImpl;
20
21 class ClientAssertionCredentialImpl final {
22 private:
23 std::function<std::string(Core::Context const&)> m_assertionCallback;
24 _detail::ClientCredentialCore m_clientCredentialCore;
25 std::unique_ptr<TokenCredentialImpl> m_tokenCredentialImpl;
26 std::string m_requestBody;
27 _detail::TokenCache m_tokenCache;
28
29 public:
30 ClientAssertionCredentialImpl(
31 std::string const& credentialName,
32 std::string tenantId,
33 std::string clientId,
34 std::function<std::string(Core::Context const&)> assertionCallback,
35 ClientAssertionCredentialOptions const& options = {});
36
37 Core::Credentials::AccessToken GetToken(
38 std::string const& credentialName,
39 Core::Credentials::TokenRequestContext const& tokenRequestContext,
40 Core::Context const& context) const;
41 };
42}}} // namespace Azure::Identity::_detail
Client Assertion Credential and options.
Token cache.
Most common implementation part for a Token Credential.