class Awscr::Signer::Signers::V4

Overview

Signs a Crystal HTTP::Request using a given scope.

signer = Signer::V4.new("s3", "region", "key", "secret")
signer.sign(request)
signer.sign("some string")
signer.presign(request)

Included Modules

Defined in:

awscr-signer/signers/v4.cr

Constructors

Instance Method Summary

Instance methods inherited from module Awscr::Signer::Signers::Interface

presign(request, *, scope : Scope = Signer::Scope.new(@region, @service)) presign, sign(string : String, *, scope : Scope = Signer::Scope.new(@region, @service))
sign(request : HTTP::Request, *, scope : Scope = Signer::Scope.new(@region, @service))
sign

Constructor Detail

def self.new(service : String, region : String, aws_access_key : String, aws_secret_key : String, amz_security_token : String | Nil = nil) #

[View source]

Instance Method Detail

def presign(request, encode_path = true, *, scope = Signer::Scope.new(@region, @service)) #

[View source]
def sign(string : String, *, scope = Signer::Scope.new(@region, @service)) #

[View source]
def sign(request : HTTP::Request, add_sha = true, encode_path = true, *, scope = Signer::Scope.new(@region, @service)) #

Sign an HTTP::Request


[View source]