class

CRE::Aws::SigV4

Inherits Reference < Object

SigV4 signer per AWS reference: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html

Constants

ALGORITHM = "AWS4-HMAC-SHA256"

Constructors

new(access_key_id : String, secret_access_key : String, region : String, service : String, session_token : String | Nil = nil)
Source

Instance methods

sign(method : String, uri : URI, headers : HTTP::Headers, body : String, now : Time = Time.utc) : Nil

Returns the signed Authorization header value plus modified headers. Mutates the headers map in-place to add 'X-Amz-Date', 'Host', 'X-Amz-Content-SHA256', 'X-Amz-Security-Token' (if any), 'Authorization'.

Source

Nested types