sigaws_quickstart_provider v0.1.1 SigawsQuickstartProvider

A quick start Sigaws verification provider that implements Sigaws.Provider behavior.

(Refer to this Blog post)

Make sure to add this in your supervision tree.

Summary

Functions

Validate signature info in the signed request

Return the signing key to be used for verification based on access key ID provided in the signature verification context

Functions

pre_verification(ctxt)

Validate signature info in the signed request.

Use this to validate that only supported regions/services are accepted. Expiration check should be performed if the corresponding attribute is set.

Sigaws will halt the verification process when this returns an errror. That same error is returned to the caller.

ReturnsWhen
{:error, :expired, ""}Check Sigaws.Util.check_expiration/1
{:error, :unknown, "region"}Region not supported
{:error, :unknown, "service"}Service not supported
{:error, atom, binary}For other errors as defined by the implementation
:okVerification passes

Callback implementation for Sigaws.Provider.pre_verification/1.

signing_key(ctxt)

Return the signing key to be used for verification based on access key ID provided in the signature verification context.

Return an error if there is no valid secret for the information provided. This will in turn halt the verification process resulting in signature verification failure.

ReturnsWhen
{:error, :unknown, "access_key"}Access key is unknown
{:error, atom, binary}For other errors as defined by the implementation
{:ok, binary}Valid signing key is generated

Callback implementation for Sigaws.Provider.signing_key/1.

start_link(gs_opts \\ [])