Ankusa.Verifier.Hmac.Scheme (ankusa v0.7.0)

Copy Markdown View Source

Declarative description of one provider's HMAC signature scheme.

The one field with no sensible default is signature_header: which header carries the signature(s). Everything else defaults to the most common shape (raw SHA-256 hex over the body).

Summary

Types

encoding()

@type encoding() :: :hex | :base64

hash()

@type hash() :: :sha256 | :sha512 | :sha1

parse()

@type parse() :: :whole | :csv_pairs | :space_versions

secret_decode()

@type secret_decode() :: :raw | :whsec_base64

t()

@type t() :: %Ankusa.Verifier.Hmac.Scheme{
  encoding: encoding(),
  hash: hash(),
  parse: parse(),
  secret_decode: secret_decode(),
  sig_key: String.t() | nil,
  sig_prefix: String.t() | nil,
  signature_header: String.t(),
  signed: String.t(),
  timestamp: timestamp(),
  version: String.t() | nil
}

timestamp()

@type timestamp() :: nil | {:header, String.t()} | {:sig, String.t()}