aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
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 {
20
22 {
24
26
28
30 };
31
32 using KerberosGetTokenFunction = std::function<bool(String &)>;
33 using NtlmGetTokenFunction = std::function<bool(const String &, String &)>;
34
36 {
37 HttpProxyStrategyAdaptiveConfig() : KerberosGetToken(), NtlmGetCredential(), NtlmGetToken() {}
38
40
42
44 };
45
47 {
48 public:
49 HttpProxyStrategy(struct aws_http_proxy_strategy *strategy);
50 virtual ~HttpProxyStrategy();
51
52 struct aws_http_proxy_strategy *GetUnderlyingHandle() const noexcept { return m_strategy; }
53
54 static std::shared_ptr<HttpProxyStrategy> CreateBasicHttpProxyStrategy(
56 Allocator *allocator = g_allocator);
57
58 static std::shared_ptr<HttpProxyStrategy> CreateAdaptiveHttpProxyStrategy(
60 Allocator *allocator = g_allocator);
61
62 protected:
63 struct aws_http_proxy_strategy *m_strategy;
64 };
65 } // namespace Http
66 } // namespace Crt
67} // namespace Aws
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Definition: HttpProxyStrategy.h:47
struct aws_http_proxy_strategy * m_strategy
Definition: HttpProxyStrategy.h:63
struct aws_http_proxy_strategy * GetUnderlyingHandle() const noexcept
Definition: HttpProxyStrategy.h:52
AwsHttpProxyConnectionType
Definition: HttpConnection.h:231
std::function< bool(String &)> KerberosGetTokenFunction
Definition: HttpProxyStrategy.h:32
std::function< bool(const String &, String &)> NtlmGetTokenFunction
Definition: HttpProxyStrategy.h:33
aws_allocator Allocator
Definition: StlAllocator.h:17
AWS_CRT_CPP_API Allocator * g_allocator
Definition: Api.cpp:21
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:47
Definition: Api.h:17
Definition: HttpProxyStrategy.h:36
KerberosGetTokenFunction NtlmGetCredential
Definition: HttpProxyStrategy.h:41
HttpProxyStrategyAdaptiveConfig()
Definition: HttpProxyStrategy.h:37
KerberosGetTokenFunction KerberosGetToken
Definition: HttpProxyStrategy.h:39
NtlmGetTokenFunction NtlmGetToken
Definition: HttpProxyStrategy.h:43
Definition: HttpProxyStrategy.h:22
String Username
Definition: HttpProxyStrategy.h:27
AwsHttpProxyConnectionType ConnectionType
Definition: HttpProxyStrategy.h:25
String Password
Definition: HttpProxyStrategy.h:29