AWS SDK for C++  1.8.74
AWS SDK for C++
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Aws::Client::AWSAuthSigner Class Referenceabstract

#include <AWSAuthSigner.h>

+ Inheritance diagram for Aws::Client::AWSAuthSigner:

Public Member Functions

 AWSAuthSigner ()
 
virtual ~AWSAuthSigner ()=default
 
virtual bool SignRequest (Aws::Http::HttpRequest &request) const =0
 
virtual bool SignRequest (Aws::Http::HttpRequest &request, bool signBody) const
 
virtual bool SignRequest (Aws::Http::HttpRequest &request, const char *region, bool signBody) const
 
virtual bool SignRequest (Aws::Http::HttpRequest &request, const char *region, const char *serviceName, bool signBody) const
 
virtual bool SignEventMessage (Aws::Utils::Event::Message &, Aws::String &) const
 
virtual bool PresignRequest (Aws::Http::HttpRequest &request, long long expirationInSeconds) const =0
 
virtual bool PresignRequest (Aws::Http::HttpRequest &request, const char *region, long long expirationInSeconds=0) const =0
 
virtual bool PresignRequest (Aws::Http::HttpRequest &request, const char *region, const char *serviceName, long long expirationInSeconds=0) const =0
 
virtual const char * GetName () const =0
 
virtual void SetClockSkew (const std::chrono::milliseconds &clockSkew)
 
virtual Aws::Utils::DateTime GetSigningTimestamp () const
 

Protected Member Functions

virtual std::chrono::milliseconds GetClockSkewOffset () const
 

Protected Attributes

std::atomic< std::chrono::milliseconds > m_clockSkew
 

Detailed Description

Auth Signer interface. Takes a generic AWS request and applies crypto tamper resistent signatures on the request.

Definition at line 56 of file AWSAuthSigner.h.

Constructor & Destructor Documentation

◆ AWSAuthSigner()

Aws::Client::AWSAuthSigner::AWSAuthSigner ( )
inline

Definition at line 59 of file AWSAuthSigner.h.

◆ ~AWSAuthSigner()

virtual Aws::Client::AWSAuthSigner::~AWSAuthSigner ( )
virtualdefault

Member Function Documentation

◆ GetClockSkewOffset()

virtual std::chrono::milliseconds Aws::Client::AWSAuthSigner::GetClockSkewOffset ( ) const
inlineprotectedvirtual

Definition at line 158 of file AWSAuthSigner.h.

◆ GetName()

virtual const char* Aws::Client::AWSAuthSigner::GetName ( ) const
pure virtual

◆ GetSigningTimestamp()

virtual Aws::Utils::DateTime Aws::Client::AWSAuthSigner::GetSigningTimestamp ( ) const
inlinevirtual

Gets the timestamp being used by the signer. This may include a clock skew if a clock skew has been detected.

Definition at line 155 of file AWSAuthSigner.h.

◆ PresignRequest() [1/3]

virtual bool Aws::Client::AWSAuthSigner::PresignRequest ( Aws::Http::HttpRequest request,
long long  expirationInSeconds 
) const
pure virtual

Takes a request and signs the URI based on the HttpMethod, URI and other info from the request. The URI can then be used in a normal HTTP call until expiration.

Implemented in Aws::Client::AWSNullSigner, Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

◆ PresignRequest() [2/3]

virtual bool Aws::Client::AWSAuthSigner::PresignRequest ( Aws::Http::HttpRequest request,
const char *  region,
long long  expirationInSeconds = 0 
) const
pure virtual

Generates a signed Uri using the injected signer. for the supplied uri and http method and region. expirationInSeconds defaults to 0 which is the default 7 days. Using m_region by default if parameter region is nullptr.

Implemented in Aws::Client::AWSNullSigner, Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

◆ PresignRequest() [3/3]

virtual bool Aws::Client::AWSAuthSigner::PresignRequest ( Aws::Http::HttpRequest request,
const char *  region,
const char *  serviceName,
long long  expirationInSeconds = 0 
) const
pure virtual

Generates a signed Uri using the injected signer. for the supplied uri and http method, region, and service name. expirationInSeconds defaults to 0 which is the default 7 days. Using m_region by default if parameter region is nullptr. Using m_serviceName by default if parameter serviceName is nullptr.

Implemented in Aws::Client::AWSNullSigner, Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

◆ SetClockSkew()

virtual void Aws::Client::AWSAuthSigner::SetClockSkew ( const std::chrono::milliseconds &  clockSkew)
inlinevirtual

This handles detection of clock skew between clients and the server and adjusts the clock so that the next request will not fail on the timestamp check.

Definition at line 150 of file AWSAuthSigner.h.

◆ SignEventMessage()

virtual bool Aws::Client::AWSAuthSigner::SignEventMessage ( Aws::Utils::Event::Message ,
Aws::String  
) const
inlinevirtual

Signs a single event message in an event stream. The input message buffer is copied and signed. The message's input buffer will be deallocated and a new buffer will be assigned. The new buffer encodes the original message with its headers as the payload of the new message. The signature of the original message will be added as a header to the new message.

A Hex encoded signature of the previous event (or of the HTTP request headers in case of the first event) is provided as the 'priorSignature' parameter. 'priorSignature' will contain the value of the new signature after this call returns successfully.

The function returns true if the message is successfully signed.

Reimplemented in Aws::Client::AWSNullSigner, and Aws::Client::AWSAuthEventStreamV4Signer.

Definition at line 118 of file AWSAuthSigner.h.

◆ SignRequest() [1/4]

virtual bool Aws::Client::AWSAuthSigner::SignRequest ( Aws::Http::HttpRequest request) const
pure virtual

Signs the request itself (usually by adding a signature header) based on info in the request and uri.

Implemented in Aws::Client::AWSNullSigner, Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

◆ SignRequest() [2/4]

virtual bool Aws::Client::AWSAuthSigner::SignRequest ( Aws::Http::HttpRequest request,
bool  signBody 
) const
inlinevirtual

Signs the request itself (usually by adding a signature header) based on info in the request and uri. If signBody is false and https is being used then the body of the payload will not be signed. The default virtual function, just calls SignRequest.

Reimplemented in Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

Definition at line 72 of file AWSAuthSigner.h.

◆ SignRequest() [3/4]

virtual bool Aws::Client::AWSAuthSigner::SignRequest ( Aws::Http::HttpRequest request,
const char *  region,
bool  signBody 
) const
inlinevirtual

Signs the request itself (usually by adding a signature header) based on info in the request and uri. If signBody is false and https is being used then the body of the payload will not be signed. The default virtual function, just calls SignRequest. Using m_region by default if parameter region is nullptr.

Reimplemented in Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

Definition at line 84 of file AWSAuthSigner.h.

◆ SignRequest() [4/4]

virtual bool Aws::Client::AWSAuthSigner::SignRequest ( Aws::Http::HttpRequest request,
const char *  region,
const char *  serviceName,
bool  signBody 
) const
inlinevirtual

Signs the request itself (usually by adding a signature header) based on info in the request and uri. If signBody is false and https is being used then the body of the payload will not be signed. The default virtual function, just calls SignRequest. Using m_region by default if parameter region is nullptr. Using m_serviceName by default if parameter serviceName is nullptr.

Reimplemented in Aws::Client::AWSAuthEventStreamV4Signer, and Aws::Client::AWSAuthV4Signer.

Definition at line 98 of file AWSAuthSigner.h.

Member Data Documentation

◆ m_clockSkew

std::atomic<std::chrono::milliseconds> Aws::Client::AWSAuthSigner::m_clockSkew
protected

Definition at line 160 of file AWSAuthSigner.h.


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