ExSwan.Plug.Response (exswan_plug v0.1.0)

Copy Markdown View Source

Stable, deliberately coarse JSON responses for ceremony endpoints.

Detailed verifier errors belong in secret-free server telemetry. Browser responses group them so callers cannot use an endpoint as a credential or policy oracle.

Summary

Functions

Sends a stable coarse response for a known ceremony failure.

Sends a stable successful ceremony response.

Types

ceremony()

@type ceremony() :: :registration | :authentication

Functions

send_error(conn, reason)

@spec send_error(Plug.Conn.t(), term()) :: Plug.Conn.t()

Sends a stable coarse response for a known ceremony failure.

send_success(conn, atom)

@spec send_success(Plug.Conn.t(), ceremony()) :: Plug.Conn.t()

Sends a stable successful ceremony response.