Bourse.Signing.Behaviour behaviour (bourse v0.1.0)

Copy Markdown View Source

Behaviour for signing pattern implementations.

First-party signing executors implement sign/3 and are dispatched through Bourse.Signing.sign/4. Runtime specs select only the closed built-in set.

Available Helpers

Bourse.Signing provides crypto and encoding helpers: timestamp_ms/0, hmac_sha256/2, hmac_sha384/2, hmac_sha512/2, sha256/1, sha512/1, encode_hex/1, encode_base64/1, decode_base64/1, urlencode/1, urlencode_raw/1.

Summary

Callbacks

Signs a request using the pattern's authentication method.

Callbacks

sign(request, credentials, config)

@callback sign(
  request :: Bourse.Signing.request(),
  credentials :: Bourse.Credentials.t(),
  config :: Bourse.Signing.config()
) :: Bourse.Signing.signed_request()

Signs a request using the pattern's authentication method.

Parameters

Returns

A Bourse.Signing.SignedRequest with :url, :method, :headers, and :body.