Lockspire. Web. ConsentContext
(lockspire v1.6.1)
Copy Markdown
Prepares the small, redaction-safe render context for a host-owned consent page.
Host LiveViews call load/2 with their current connection or socket and the
interaction identifier from the route. Lockspire performs the authoritative
interaction lookup, account resolution, subject binding, expiration checks,
and remembered-consent transition before returning decision-capable facts.
The returned context deliberately excludes repository records, account and interaction identifiers, redirect URIs, raw authorization details, tokens, and protocol errors. A redirect result is terminal and must be performed without rendering its destination.
Summary
Types
@type error_reason() :: :not_found | :expired | :subject_mismatch | :unavailable
Functions
@spec load(Plug.Conn.t() | Phoenix.LiveView.Socket.t() | term(), String.t()) :: {:ok, render_context()} | {:redirect, String.t()} | {:error, error_reason()}