AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
Go to the documentation of this file.
15 struct aws_credentials;
16 struct aws_credentials_provider;
40 Credentials(
const aws_credentials *credentials) noexcept;
45 uint64_t expiration_timepoint_in_seconds,
70 ByteCursor GetSecretAccessKey() const noexcept;
80 uint64_t GetExpirationTimepointInSeconds() const noexcept;
85 explicit operator
bool() const noexcept;
90 const aws_credentials *GetUnderlyingHandle() const noexcept {
return m_credentials; }
93 const aws_credentials *m_credentials;
132 virtual
bool IsValid() const noexcept = 0;
142 AWS_ZERO_STRUCT(AccessKeyId);
143 AWS_ZERO_STRUCT(SecretAccessKey);
144 AWS_ZERO_STRUCT(SessionToken);
170 AWS_ZERO_STRUCT(ProfileNameOverride);
171 AWS_ZERO_STRUCT(ConfigFileNameOverride);
172 AWS_ZERO_STRUCT(CredentialsFileNameOverride);
293 : Bootstrap(nullptr), TlsOptions(), ThingName(), RoleAlias(), Endpoint(), ProxyOptions()
481 virtual bool IsValid() const noexcept
override {
return m_provider !=
nullptr; }
490 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderStatic(
498 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderAnonymous(
504 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderEnvironment(
510 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderProfile(
517 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderImds(
525 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderChain(
533 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderCached(
543 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderChainDefault(
551 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderX509(
559 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderDelegate(
566 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderCognito(
573 static std::shared_ptr<ICredentialsProvider> CreateCredentialsProviderSTS(
578 static void s_onCredentialsResolved(aws_credentials *credentials,
int error_code,
void *user_data);
581 aws_credentials_provider *m_provider;
Io::TlsContext TlsCtx
Definition: Credentials.h:442
Credentials(const Credentials &)=delete
Vector< std::shared_ptr< ICredentialsProvider > > Providers
Definition: Credentials.h:238
Definition: Credentials.h:291
ByteCursor AccessKeyId
Definition: Credentials.h:150
ByteCursor CredentialsFileNameOverride
Definition: Credentials.h:190
String ThingName
Definition: Credentials.h:310
CredentialsProviderImdsConfig()
Definition: Credentials.h:214
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
virtual bool GetCredentials(const OnCredentialsResolved &onCredentialsResolved) const =0
Definition: Credentials.h:167
GetCredentialsHandler Handler
Definition: Credentials.h:335
Optional< Http::HttpClientConnectionProxyOptions > ProxyOptions
Definition: Credentials.h:400
String RoleArn
Definition: Credentials.h:418
std::chrono::milliseconds CachedCredentialTTL
Definition: Credentials.h:256
CredentialsProvider(CredentialsProvider &&)=delete
std::function< void(std::shared_ptr< Credentials >, int errorCode)> OnCredentialsResolved
Definition: Credentials.h:100
Definition: Credentials.h:266
Io::TlsContext * TlsContext
Definition: Credentials.h:284
std::shared_ptr< ICredentialsProvider > Provider
Definition: Credentials.h:413
Definition: TlsOptions.h:293
String Identity
Definition: Credentials.h:370
CredentialsProvider & operator=(CredentialsProvider &&)=delete
Credentials & operator=(const Credentials &)=delete
Io::TlsContext * TlsContext
Definition: Credentials.h:206
Io::ClientBootstrap * Bootstrap
Definition: Credentials.h:437
ByteCursor SecretAccessKey
Definition: Credentials.h:155
ByteCursor ConfigFileNameOverride
Definition: Credentials.h:184
Definition: Credentials.h:407
std::function< std::shared_ptr< Credentials >()> GetCredentialsHandler
Definition: Credentials.h:105
Credentials(Credentials &&)=delete
CredentialsProviderProfileConfig()
Definition: Credentials.h:168
Credentials & operator=(Credentials &&)=delete
Io::TlsContext TlsCtx
Definition: Credentials.h:395
Io::ClientBootstrap * Bootstrap
Definition: Credentials.h:275
Optional< Http::HttpClientConnectionProxyOptions > ProxyOptions
Definition: Credentials.h:447
String SessionName
Definition: Credentials.h:423
Definition: Credentials.h:457
Io::TlsConnectionOptions TlsOptions
Definition: Credentials.h:307
std::shared_ptr< ICredentialsProvider > Provider
Definition: Credentials.h:251
String Endpoint
Definition: Credentials.h:321
Definition: Credentials.h:245
Definition: Optional.h:18
CredentialsProviderChainDefaultConfig()
Definition: Credentials.h:267
Definition: TlsOptions.h:350
Optional< Vector< CognitoLoginPair > > Logins
Definition: Credentials.h:375
virtual ~ICredentialsProvider()=default
virtual aws_credentials_provider * GetUnderlyingHandle() const noexcept override
Definition: Credentials.h:476
CredentialsProvider & operator=(const CredentialsProvider &)=delete
CredentialsProviderChainConfig()
Definition: Credentials.h:233
Io::ClientBootstrap * Bootstrap
Definition: Credentials.h:196
uint16_t DurationSeconds
Definition: Credentials.h:428
Definition: Credentials.h:112
Definition: Credentials.h:232
Io::ClientBootstrap * Bootstrap
Definition: Credentials.h:223
Io::ClientBootstrap * Bootstrap
Definition: Credentials.h:390
Optional< Http::HttpClientConnectionProxyOptions > ProxyOptions
Definition: Credentials.h:326
CredentialsProviderCachedConfig()
Definition: Credentials.h:246
virtual aws_credentials_provider * GetUnderlyingHandle() const noexcept=0
Definition: HttpConnection.h:270
Optional< String > CustomRoleArn
Definition: Credentials.h:381
std::vector< T, StlAllocator< T > > Vector
Definition: Types.h:53
String Endpoint
Definition: Credentials.h:365
Definition: Credentials.h:359
ByteCursor SessionToken
Definition: Credentials.h:160
Definition: Credentials.h:38
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Definition: Credentials.h:213
Definition: Allocator.h:11
Definition: Credentials.h:139
Definition: Credentials.h:342
aws_byte_cursor ByteCursor
Definition: Types.h:31
aws_allocator Allocator
Definition: Allocator.h:14
String RoleAlias
Definition: Credentials.h:313
String IdentityProviderToken
Definition: Credentials.h:352
Definition: Bootstrap.h:35
String IdentityProviderName
Definition: Credentials.h:347
CredentialsProviderX509Config()
Definition: Credentials.h:292
CredentialsProviderStaticConfig()
Definition: Credentials.h:140
CredentialsProvider(const CredentialsProvider &)=delete
Io::ClientBootstrap * Bootstrap
Definition: Credentials.h:304
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:45
ByteCursor ProfileNameOverride
Definition: Credentials.h:178
Definition: Credentials.h:333
virtual bool IsValid() const noexcept override
Definition: Credentials.h:481