AWS IoT Device SDK C++ v2: Aws::Crt::Auth::AwsSigningConfig Class Reference

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

Public Member Functions | List of all members
Aws::Crt::Auth::AwsSigningConfig Class Reference

`#include <Sigv4Signing.h>`

Inheritance diagram for Aws::Crt::Auth::AwsSigningConfig:

## Public Member Functions
| AwsSigningConfig (Allocator *allocator=g_allocator)
virtual | ~AwsSigningConfig ()
virtual SigningConfigType | GetType () const noexcept override
SigningAlgorithm | GetSigningAlgorithm () const noexcept
void | SetSigningAlgorithm (SigningAlgorithm algorithm) noexcept
SignatureType | GetSignatureType () const noexcept
void | SetSignatureType (SignatureType signatureType) noexcept
const Crt::String & | GetRegion () const noexcept
void | SetRegion (const Crt::String &region) noexcept
const Crt::String & | GetService () const noexcept
void | SetService (const Crt::String &service) noexcept
DateTime | GetSigningTimepoint () const noexcept
void | SetSigningTimepoint (const DateTime &date) noexcept
bool | GetUseDoubleUriEncode () const noexcept
void | SetUseDoubleUriEncode (bool useDoubleUriEncode) noexcept
bool | GetShouldNormalizeUriPath () const noexcept
void | SetShouldNormalizeUriPath (bool shouldNormalizeUriPath) noexcept
bool | GetOmitSessionToken () const noexcept
void | SetOmitSessionToken (bool omitSessionToken) noexcept
ShouldSignHeaderCb | GetShouldSignHeaderCallback () const noexcept
void | SetShouldSignHeaderCallback (ShouldSignHeaderCb shouldSignHeaderCb) noexcept
void * | GetShouldSignHeaderUserData () const noexcept
void | SetShouldSignHeaderUserData (void *userData) noexcept
const Crt::String & | GetSignedBodyValue () const noexcept
void | SetSignedBodyValue (const Crt::String &signedBodyValue) noexcept
SignedBodyHeaderType | GetSignedBodyHeader () const noexcept
void | SetSignedBodyHeader (SignedBodyHeaderType signedBodyHeader) noexcept
uint64_t | GetExpirationInSeconds () const noexcept
void | SetExpirationInSeconds (uint64_t expirationInSeconds) noexcept
const std::shared_ptr< ICredentialsProvider > & | GetCredentialsProvider () const noexcept
void | SetCredentialsProvider (const std::shared_ptr< ICredentialsProvider > &credsProvider) noexcept
const std::shared_ptr< Credentials > & | GetCredentials () const noexcept
void | SetCredentials (const std::shared_ptr< Credentials > &credentials) noexcept
Public Member Functions inherited from Aws::Crt::Auth::ISigningConfig
| ISigningConfig ()=default
| ISigningConfig (const ISigningConfig &)=delete
| ISigningConfig (ISigningConfig &&)=delete
ISigningConfig & | operator= (const ISigningConfig &)=delete
ISigningConfig & | operator= (ISigningConfig &&)=delete
virtual | ~ISigningConfig ()=default

## Detailed Description

Wrapper around the configuration structure specific to the AWS Sigv4 signing process

## Constructor & Destructor Documentation

## ◆ AwsSigningConfig()

Aws::Crt::Auth::AwsSigningConfig::AwsSigningConfig | ( | Allocator * | allocator = `g_allocator` | ) |

## ◆ ~AwsSigningConfig()

Aws::Crt::Auth::AwsSigningConfig::~AwsSigningConfig | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ GetCredentials()

const std::shared_ptr< Credentials > & Aws::Crt::Auth::AwsSigningConfig::GetCredentials | ( |  | ) | const
| noexcept

Returns
  the credentials to use for signing.

## ◆ GetCredentialsProvider()

const std::shared_ptr< ICredentialsProvider > & Aws::Crt::Auth::AwsSigningConfig::GetCredentialsProvider | ( |  | ) | const
| noexcept

Returns
  the credentials provider to use for signing.

## ◆ GetExpirationInSeconds()

uint64_t Aws::Crt::Auth::AwsSigningConfig::GetExpirationInSeconds | ( |  | ) | const
| noexcept

Returns
  (Query param signing only) Gets the amount of time, in seconds, the (pre)signed URI will be good for

## ◆ GetOmitSessionToken()

bool Aws::Crt::Auth::AwsSigningConfig::GetOmitSessionToken | ( |  | ) | const
| noexcept

Returns
  whether or not to omit the session token during signing. Only set to true when performing a websocket handshake with IoT Core.

## ◆ GetRegion()

const Crt::String & Aws::Crt::Auth::AwsSigningConfig::GetRegion | ( |  | ) | const
| noexcept

Returns
  the AWS region to sign against

## ◆ GetService()

const Crt::String & Aws::Crt::Auth::AwsSigningConfig::GetService | ( |  | ) | const
| noexcept

Returns
  the (signing) name of the AWS service to sign a request for

## ◆ GetShouldNormalizeUriPath()

bool Aws::Crt::Auth::AwsSigningConfig::GetShouldNormalizeUriPath | ( |  | ) | const
| noexcept

Returns
  whether or not the uri paths should be normalized when building the canonical request

## ◆ GetShouldSignHeaderCallback()

ShouldSignHeaderCb Aws::Crt::Auth::AwsSigningConfig::GetShouldSignHeaderCallback | ( |  | ) | const
| noexcept

Returns
  the ShouldSignHeadersCb from the underlying config.

## ◆ GetShouldSignHeaderUserData()

void * Aws::Crt::Auth::AwsSigningConfig::GetShouldSignHeaderUserData | ( |  | ) | const
| noexcept

Returns
  the should_sign_header_ud from the underlying config.

## ◆ GetSignatureType()

SignatureType Aws::Crt::Auth::AwsSigningConfig::GetSignatureType | ( |  | ) | const
| noexcept

Returns
  the type of signature we want to calculate

## ◆ GetSignedBodyHeader()

SignedBodyHeaderType Aws::Crt::Auth::AwsSigningConfig::GetSignedBodyHeader | ( |  | ) | const
| noexcept

Returns
  the name of the header to add that stores the signed body value

## ◆ GetSignedBodyValue()

const Crt::String & Aws::Crt::Auth::AwsSigningConfig::GetSignedBodyValue | ( |  | ) | const
| noexcept

Returns
  the string used as the canonical request's body value. If string is empty, a value is be calculated from the payload during signing.

## ◆ GetSigningAlgorithm()

SigningAlgorithm Aws::Crt::Auth::AwsSigningConfig::GetSigningAlgorithm | ( |  | ) | const
| noexcept

Returns
  the signing process we want to invoke

## ◆ GetSigningTimepoint()

DateTime Aws::Crt::Auth::AwsSigningConfig::GetSigningTimepoint | ( |  | ) | const
| noexcept

Returns
  the timestamp to use during the signing process.

## ◆ GetType()

virtual SigningConfigType Aws::Crt::Auth::AwsSigningConfig::GetType | ( |  | ) | const
| inlineoverridevirtualnoexcept

RTTI query for the SigningConfig hierarchy

Returns
  the type of signing configuration

Implements Aws::Crt::Auth::ISigningConfig.

## ◆ GetUseDoubleUriEncode()

bool Aws::Crt::Auth::AwsSigningConfig::GetUseDoubleUriEncode | ( |  | ) | const
| noexcept

Returns
  whether or not the signing process should perform a uri encode step before creating the canonical request.

## ◆ SetCredentials()

void Aws::Crt::Auth::AwsSigningConfig::SetCredentials | ( | const std::shared_ptr< Credentials > & | credentials | ) |
| noexcept

Set the credentials to use for signing.

## ◆ SetCredentialsProvider()

void Aws::Crt::Auth::AwsSigningConfig::SetCredentialsProvider | ( | const std::shared_ptr< ICredentialsProvider > & | credsProvider | ) |
| noexcept

Set the credentials provider to use for signing.

## ◆ SetExpirationInSeconds()

void Aws::Crt::Auth::AwsSigningConfig::SetExpirationInSeconds | ( | uint64_t | expirationInSeconds | ) |
| noexcept

(Query param signing only) Sets the amount of time, in seconds, the (pre)signed URI will be good for

## ◆ SetOmitSessionToken()

void Aws::Crt::Auth::AwsSigningConfig::SetOmitSessionToken | ( | bool | omitSessionToken | ) |
| noexcept

Sets whether or not to omit the session token during signing. Only set to true when performing a websocket handshake with IoT Core.

## ◆ SetRegion()

void Aws::Crt::Auth::AwsSigningConfig::SetRegion | ( | const Crt::String & | region | ) |
| noexcept

Sets the AWS region to sign against

## ◆ SetService()

void Aws::Crt::Auth::AwsSigningConfig::SetService | ( | const Crt::String & | service | ) |
| noexcept

Sets the (signing) name of the AWS service to sign a request for

## ◆ SetShouldNormalizeUriPath()

void Aws::Crt::Auth::AwsSigningConfig::SetShouldNormalizeUriPath | ( | bool | shouldNormalizeUriPath | ) |
| noexcept

Sets whether or not the uri paths should be normalized when building the canonical request

## ◆ SetShouldSignHeaderCallback()

void Aws::Crt::Auth::AwsSigningConfig::SetShouldSignHeaderCallback | ( | ShouldSignHeaderCb | shouldSignHeaderCb | ) |
| noexcept

Sets a callback invoked during the signing process for white-listing headers that can be signed. If you do not set this, all headers will be signed.

## ◆ SetShouldSignHeaderUserData()

void Aws::Crt::Auth::AwsSigningConfig::SetShouldSignHeaderUserData | ( | void * | userData | ) |
| noexcept

Sets the userData you could get from the ShouldSignHeaderCb callback function.

## ◆ SetSignatureType()

void Aws::Crt::Auth::AwsSigningConfig::SetSignatureType | ( | SignatureType | signatureType | ) |
| noexcept

Sets the type of signature we want to calculate

## ◆ SetSignedBodyHeader()

void Aws::Crt::Auth::AwsSigningConfig::SetSignedBodyHeader | ( | SignedBodyHeaderType | signedBodyHeader | ) |
| noexcept

Sets the name of the header to add that stores the signed body value

## ◆ SetSignedBodyValue()

void Aws::Crt::Auth::AwsSigningConfig::SetSignedBodyValue | ( | const Crt::String & | signedBodyValue | ) |
| noexcept

Sets the string to use as the canonical request's body value. If an empty string is set (the default), a value will be calculated from the payload during signing. Typically, this is the SHA-256 of the (request/chunk/event) payload, written as lowercase hex. If this has been precalculated, it can be set here. Special values used by certain services can also be set (see Aws::Crt::Auth::SignedBodyValue).

## ◆ SetSigningAlgorithm()

void Aws::Crt::Auth::AwsSigningConfig::SetSigningAlgorithm | ( | SigningAlgorithm | algorithm | ) |
| noexcept

Sets the signing process we want to invoke

## ◆ SetSigningTimepoint()

void Aws::Crt::Auth::AwsSigningConfig::SetSigningTimepoint | ( | const DateTime & | date | ) |
| noexcept

Sets the timestamp to use during the signing process.

## ◆ SetUseDoubleUriEncode()

void Aws::Crt::Auth::AwsSigningConfig::SetUseDoubleUriEncode | ( | bool | useDoubleUriEncode | ) |
| noexcept

Sets whether or not the signing process should perform a uri encode step before creating the canonical request.

The documentation for this class was generated from the following files:

- crt/aws-crt-cpp/include/aws/crt/auth/Sigv4Signing.h
- crt/aws-crt-cpp/source/auth/Sigv4Signing.cpp