HTTPSignatures. Adapter behaviour
(http_signatures v0.1.3)
Copy Markdown
Contract for HTTPSignatures adapters.
Projects making use of the HTTPSignatures library use an adapter in order to provide and refresh the keys used to validate signatures.
To set the adapter in your project, use the config system:
config :http_signatures, adapter: YourAdapter
Summary
Callbacks
@callback fetch_public_key(Plug.Conn.t()) :: {:ok, any()} | {:error, any()}
Fetch a public key, given a Plug.Conn structure.
@callback refetch_public_key(Plug.Conn.t()) :: {:ok, any()} | {:error, any()}
Refetch a public key, given a Plug.Conn structure.
Called when the initial key supplied failed to validate the signature.