AshOnetime.KeyResolver behaviour (ash_onetime v0.4.0)

Copy Markdown View Source

Resolves purpose-specific signing or verification material.

A resolver must keep :sign and :verify lookups distinct. Material is passed unchanged to the selected signer, which validates its trust and role tags.

Summary

Types

algorithm()

@type algorithm() :: :hmac_sha256 | :ed25519

purpose()

@type purpose() :: :sign | :verify

Callbacks

resolve(purpose, t, algorithm, term)

@callback resolve(purpose(), String.t(), algorithm(), term()) ::
  {:ok, term()} | {:error, term()}