AWS IoT Device SDK C++ v2: crt/aws-crt-cpp/include/aws/crt/auth/Signing.h Source File

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

Signing.h
Go to the documentation of this file.
1#pragma once
7#include <aws/crt/Exports.h>
8
9#include <aws/auth/signing_config.h>
10
11#include <functional>
12#include <memory>
13
14namespace Aws
15{
16 namespace Crt
17 {
18 namespace Http
19 {
20 class HttpRequest;
21 }
22
23 namespace Auth
24 {
29 enum class SigningConfigType
30 {
31 Aws = AWS_SIGNING_CONFIG_AWS
32 };
33
38 using OnHttpRequestSigningComplete =
39 std::function<void(const std::shared_ptr<Aws::Crt::Http::HttpRequest> &, int)>;
40
45 class AWS_CRT_CPP_API ISigningConfig
46 {
47 public:
48 ISigningConfig() = default;
49 ISigningConfig(const ISigningConfig &) = delete;
50 ISigningConfig(ISigningConfig &&) = delete;
51 ISigningConfig &operator=(const ISigningConfig &) = delete;
52 ISigningConfig &operator=(ISigningConfig &&) = delete;
53
54 virtual ~ISigningConfig() = default;
55
60 virtual SigningConfigType GetType(void) const = 0;
61 };
62
67 class AWS_CRT_CPP_API IHttpRequestSigner
68 {
69 public:
70 IHttpRequestSigner() = default;
71 IHttpRequestSigner(const IHttpRequestSigner &) = delete;
72 IHttpRequestSigner(IHttpRequestSigner &&) = delete;
73 IHttpRequestSigner &operator=(const IHttpRequestSigner &) = delete;
74 IHttpRequestSigner &operator=(IHttpRequestSigner &&) = delete;
75
76 virtual ~IHttpRequestSigner() = default;
77
86 virtual bool SignRequest(
87 const std::shared_ptr<Aws::Crt::Http::HttpRequest> &request,
88 const ISigningConfig &config,
89 const OnHttpRequestSigningComplete &completionCallback) = 0;
90
94 virtual bool IsValid() const = 0;
95 };
96
97 } // namespace Auth
98 } // namespace Crt
99} // namespace Aws
Aws::Crt::Auth::IHttpRequestSigner
Definition: Signing.h:68
Aws::Crt::Auth::IHttpRequestSigner::operator=
IHttpRequestSigner & operator=(const IHttpRequestSigner &)=delete
Aws::Crt::Auth::IHttpRequestSigner::~IHttpRequestSigner
virtual ~IHttpRequestSigner()=default
Aws::Crt::Auth::IHttpRequestSigner::IHttpRequestSigner
IHttpRequestSigner()=default
Aws::Crt::Auth::IHttpRequestSigner::operator=
IHttpRequestSigner & operator=(IHttpRequestSigner &&)=delete
Aws::Crt::Auth::IHttpRequestSigner::IHttpRequestSigner
IHttpRequestSigner(const IHttpRequestSigner &)=delete
Aws::Crt::Auth::IHttpRequestSigner::SignRequest
virtual bool SignRequest(const std::shared_ptr< Aws::Crt::Http::HttpRequest > &request, const ISigningConfig &config, const OnHttpRequestSigningComplete &completionCallback)=0
Aws::Crt::Auth::IHttpRequestSigner::IsValid
virtual bool IsValid() const =0
Aws::Crt::Auth::IHttpRequestSigner::IHttpRequestSigner
IHttpRequestSigner(IHttpRequestSigner &&)=delete
Aws::Crt::Auth::ISigningConfig
Definition: Signing.h:46
Aws::Crt::Auth::ISigningConfig::ISigningConfig
ISigningConfig()=default
Aws::Crt::Auth::ISigningConfig::ISigningConfig
ISigningConfig(const ISigningConfig &)=delete
Aws::Crt::Auth::ISigningConfig::operator=
ISigningConfig & operator=(ISigningConfig &&)=delete
Aws::Crt::Auth::ISigningConfig::operator=
ISigningConfig & operator=(const ISigningConfig &)=delete
Aws::Crt::Auth::ISigningConfig::GetType
virtual SigningConfigType GetType(void) const =0
Aws::Crt::Auth::ISigningConfig::~ISigningConfig
virtual ~ISigningConfig()=default
Aws::Crt::Auth::ISigningConfig::ISigningConfig
ISigningConfig(ISigningConfig &&)=delete
Exports.h
AWS_CRT_CPP_API
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Aws::Crt::Auth::SigningConfigType
SigningConfigType
Definition: Signing.h:30
Aws::Crt::Auth::OnHttpRequestSigningComplete
std::function< void(const std::shared_ptr< Aws::Crt::Http::HttpRequest > &, int)> OnHttpRequestSigningComplete
Definition: Signing.h:39
Aws
Definition: Api.h:17