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

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

HttpProxyStrategy.h
Go to the documentation of this file.
1#pragma once
7#include <aws/crt/Types.h>
8
9#include <memory>
10
11struct aws_http_proxy_strategy;
12
13namespace Aws
14{
15 namespace Crt
16 {
17 namespace Http
18 {
19 enum class AwsHttpProxyConnectionType;
20
24 struct AWS_CRT_CPP_API HttpProxyStrategyBasicAuthConfig
25 {
26 HttpProxyStrategyBasicAuthConfig();
27
32 AwsHttpProxyConnectionType ConnectionType;
33
37 String Username;
38
42 String Password;
43 };
44
45 using KerberosGetTokenFunction = std::function<bool(String &)>;
46 using NtlmGetTokenFunction = std::function<bool(const String &, String &)>;
47
57 struct AWS_CRT_CPP_API HttpProxyStrategyAdaptiveConfig
58 {
59 HttpProxyStrategyAdaptiveConfig() : KerberosGetToken(), NtlmGetCredential(), NtlmGetToken() {}
60
64 KerberosGetTokenFunction KerberosGetToken;
65
69 KerberosGetTokenFunction NtlmGetCredential;
70
74 NtlmGetTokenFunction NtlmGetToken;
75 };
76
81 class AWS_CRT_CPP_API HttpProxyStrategy
82 {
83 public:
84 HttpProxyStrategy(struct aws_http_proxy_strategy *strategy);
85 virtual ~HttpProxyStrategy();
86
88 struct aws_http_proxy_strategy *GetUnderlyingHandle() const noexcept { return m_strategy; }
89
96 static std::shared_ptr<HttpProxyStrategy> CreateBasicHttpProxyStrategy(
97 const HttpProxyStrategyBasicAuthConfig &config,
98 Allocator *allocator = g_allocator);
99
107 static std::shared_ptr<HttpProxyStrategy> CreateAdaptiveHttpProxyStrategy(
108 const HttpProxyStrategyAdaptiveConfig &config,
109 Allocator *allocator = g_allocator);
110
111 protected:
112 struct aws_http_proxy_strategy *m_strategy;
113 };
114 } // namespace Http
115 } // namespace Crt
116} // namespace Aws
Types.h
Aws::Crt::Http::HttpProxyStrategy
Definition: HttpProxyStrategy.h:82
Aws::Crt::Http::HttpProxyStrategy::m_strategy
struct aws_http_proxy_strategy * m_strategy
Definition: HttpProxyStrategy.h:112
AWS_CRT_CPP_API
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Aws::Crt::Http::AwsHttpProxyConnectionType
AwsHttpProxyConnectionType
Definition: HttpConnection.h:243
Aws::Crt::Http::KerberosGetTokenFunction
std::function< bool(String &)> KerberosGetTokenFunction
Definition: HttpProxyStrategy.h:45
Aws::Crt::Http::NtlmGetTokenFunction
std::function< bool(const String &, String &)> NtlmGetTokenFunction
Definition: HttpProxyStrategy.h:46
Aws::Crt::Allocator
aws_allocator Allocator
Definition: StlAllocator.h:17
Aws::Crt::g_allocator
AWS_CRT_CPP_API Allocator * g_allocator
Definition: Api.cpp:21
Aws::Crt::String
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:47
Aws
Definition: Api.h:17
Aws::Crt::Http::HttpProxyStrategyAdaptiveConfig
Definition: HttpProxyStrategy.h:58
Aws::Crt::Http::HttpProxyStrategyAdaptiveConfig::NtlmGetCredential
KerberosGetTokenFunction NtlmGetCredential
Definition: HttpProxyStrategy.h:69
Aws::Crt::Http::HttpProxyStrategyAdaptiveConfig::HttpProxyStrategyAdaptiveConfig
HttpProxyStrategyAdaptiveConfig()
Definition: HttpProxyStrategy.h:59
Aws::Crt::Http::HttpProxyStrategyAdaptiveConfig::KerberosGetToken
KerberosGetTokenFunction KerberosGetToken
Definition: HttpProxyStrategy.h:64
Aws::Crt::Http::HttpProxyStrategyAdaptiveConfig::NtlmGetToken
NtlmGetTokenFunction NtlmGetToken
Definition: HttpProxyStrategy.h:74
Aws::Crt::Http::HttpProxyStrategyBasicAuthConfig
Definition: HttpProxyStrategy.h:25
Aws::Crt::Http::HttpProxyStrategyBasicAuthConfig::Username
String Username
Definition: HttpProxyStrategy.h:37
Aws::Crt::Http::HttpProxyStrategyBasicAuthConfig::ConnectionType
AwsHttpProxyConnectionType ConnectionType
Definition: HttpProxyStrategy.h:32
Aws::Crt::Http::HttpProxyStrategyBasicAuthConfig::Password
String Password
Definition: HttpProxyStrategy.h:42