8#include <aws/s3/S3_EXPORTS.h>
9#include <aws/s3/S3Request.h>
10#include <aws/s3/S3Errors.h>
11#include <aws/s3/S3ExpressIdentityProvider.h>
12#include <aws/core/client/AWSClient.h>
13#include <aws/core/utils/ConcurrentCache.h>
14#include <aws/core/http/HttpRequest.h>
21 const std::shared_ptr<Auth::AWSCredentialsProvider> &credentialsProvider,
25 bool urlEscapePath =
true,
34 const char *serviceName,
40 const char* serviceName,
41 long long expirationInSeconds
50 inline bool hasRequestId(
const Aws::String &requestId)
const {
51 std::lock_guard<std::mutex> lock(m_requestProcessing);
52 return m_requestsProcessing.find(requestId) != m_requestsProcessing.end();
55 inline void putRequestId(
const Aws::String &requestId)
const {
56 std::lock_guard<std::mutex> lock(m_requestProcessing);
57 m_requestsProcessing.insert(requestId);
60 inline void deleteRequestId(
const Aws::String &requestId)
const {
61 std::lock_guard<std::mutex> lock(m_requestProcessing);
62 m_requestsProcessing.erase(requestId);
65 std::shared_ptr<S3ExpressIdentityProvider> m_S3ExpressIdentityProvider;
66 std::shared_ptr<Auth::AWSCredentialsProvider> m_credentialsProvider;
67 mutable std::set<Aws::String> m_requestsProcessing;
68 mutable std::mutex m_requestProcessing;
virtual ~S3ExpressSigner()
bool PresignRequest(Aws::Http::HttpRequest &request, const char *region, const char *serviceName, long long expirationInSeconds) const override
S3ExpressSigner(std::shared_ptr< S3ExpressIdentityProvider > S3ExpressIdentityProvider, const std::shared_ptr< Auth::AWSCredentialsProvider > &credentialsProvider, const Aws::String &serviceName, const Aws::String ®ion, PayloadSigningPolicy signingPolicy=PayloadSigningPolicy::RequestDependent, bool urlEscapePath=true, Aws::Auth::AWSSigningAlgorithm signingAlgorithm=Aws::Auth::AWSSigningAlgorithm::SIGV4)
const char * GetName() const override
Aws::Auth::AWSCredentials GetCredentials(const std::shared_ptr< Aws::Http::ServiceSpecificParameters > &serviceSpecificParameters) const override
bool ServiceRequireUnsignedPayload(const String &serviceName) const override
bool SignRequest(Aws::Http::HttpRequest &request, const char *region, const char *serviceName, bool signBody) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String