6#include "azure/core/amqp/internal/session.hpp"
8#include <azure/core/context.hpp>
10namespace Azure {
namespace Core {
namespace Amqp {
namespace _detail {
11 class ClaimsBasedSecurityImpl;
13 enum class CbsOperationResult
22 std::ostream& operator<<(std::ostream& os, CbsOperationResult operationResult);
24 enum class CbsOpenResult
31 std::ostream& operator<<(std::ostream& os, CbsOpenResult operationResult);
33 enum class CbsTokenType
40#if defined(_azure_TESTING_BUILD)
51 class ClaimsBasedSecurity final {
58 ClaimsBasedSecurity(Azure::Core::Amqp::_internal::Session
const& session);
59 ~ClaimsBasedSecurity() noexcept;
61 ClaimsBasedSecurity(ClaimsBasedSecurity const&) = default;
62 ClaimsBasedSecurity& operator=(ClaimsBasedSecurity const&) = default;
63 ClaimsBasedSecurity(ClaimsBasedSecurity&&) noexcept = default;
64 ClaimsBasedSecurity& operator=(ClaimsBasedSecurity&&) noexcept = default;
66 CbsOpenResult Open(Context const& context = {});
67 void Close(Context
const& context = {});
68 std::tuple<CbsOperationResult, uint32_t, std::string> PutToken(
70 std::string
const& audience,
71 std::string
const& token,
72 Context
const& context = {});
75 std::shared_ptr<ClaimsBasedSecurityImpl> m_impl;