AshOnetime.Verifier behaviour (ash_onetime v0.3.0)

Copy Markdown View Source

Behaviour for trusted local verification callbacks.

Summary

Callbacks

algorithm()

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

trust_model()

@callback trust_model() :: :same_service | :separated

verify(raw_token, context)

@callback verify(raw_token :: binary(), context :: map()) ::
  {:ok, AshOnetime.Verified.t()} | {:error, term()}