AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
AwsSignerBase.h
1
5#pragma once
6
7#include <atomic>
8#include <smithy/identity/identity/AwsIdentity.h>
9
10#include <aws/crt/Variant.h>
11#include <aws/core/client/AWSError.h>
12#include <aws/core/http/HttpRequest.h>
13#include <aws/core/utils/FutureOutcome.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15
16
17namespace smithy {
19 public:
20 virtual ~AwsSignerCommon() = default;
25 virtual void SetClockSkew(const std::chrono::milliseconds& clockSkew) { m_clockSkew = clockSkew; }
30
31 protected:
32 virtual std::chrono::milliseconds GetClockSkewOffset() const { return m_clockSkew.load(); }
33 std::atomic<std::chrono::milliseconds> m_clockSkew = {};
34 };
35
36 template<typename IDENTITY_T>
38 public:
39 using IdentityT = IDENTITY_T;
40 static_assert(std::is_base_of<AwsIdentity, IDENTITY_T>::value, "Identity type should inherit AwsIdentity");
46
47 // signer may copy the original httpRequest or create a new one
48 virtual SigningFutureOutcome sign(std::shared_ptr<HttpRequest> httpRequest, const IdentityT& identity, SigningProperties properties) = 0;
49
50 virtual ~AwsSignerBase() {};
51 };
52}
static DateTime Now()
virtual SigningFutureOutcome sign(std::shared_ptr< HttpRequest > httpRequest, const IdentityT &identity, SigningProperties properties)=0
Aws::UnorderedMap< Aws::String, Aws::Crt::Variant< Aws::String, bool > > AdditionalParameters
Aws::UnorderedMap< Aws::String, Aws::Crt::Variant< Aws::String, bool > > SigningProperties
virtual void SetClockSkew(const std::chrono::milliseconds &clockSkew)
virtual Aws::Utils::DateTime GetSigningTimestamp() const
virtual std::chrono::milliseconds GetClockSkewOffset() const
std::atomic< std::chrono::milliseconds > m_clockSkew
virtual ~AwsSignerCommon()=default
std::unordered_map< K, V, std::hash< K >, std::equal_to< K >, Aws::Allocator< std::pair< const K, V > > > UnorderedMap
Definition AWSMap.h:21