6#include "azure/data/tables/credentials/named_key_credential.hpp"
8#include <azure/core/http/policies/policy.hpp>
13namespace Azure {
namespace Data {
namespace Tables {
namespace _detail {
namespace Policies {
14 class SharedKeyLitePolicy final :
public Core::Http::Policies::HttpPolicy {
16 explicit SharedKeyLitePolicy(std::shared_ptr<Credentials::NamedKeyCredential> credential)
17 : m_credential{std::move(credential)}
21 ~SharedKeyLitePolicy()
override {}
23 std::unique_ptr<HttpPolicy> Clone()
const override
25 return std::make_unique<SharedKeyLitePolicy>(m_credential);
28 std::unique_ptr<Core::Http::RawResponse> Send(
29 Core::Http::Request& request,
30 Core::Http::Policies::NextHttpPolicy nextPolicy,
31 Core::Context
const& context)
const override
35 "SharedKeyLite " + m_credential->AccountName +
":" + GetSignature(request));
36 return nextPolicy.Send(request, context);
39 std::string GetSignature(
const Core::Http::Request& request)
const;
40 std::shared_ptr<Credentials::NamedKeyCredential> m_credential;