PhoenixCap.Plug (PhoenixCap v0.1.0)

Copy Markdown View Source

Cap challenge and redemption endpoint with self-hosted widget assets.

forward "/cap", PhoenixCap.Plug

Forward the route outside the browser pipeline so the widget can send its challenge and redemption requests. Protect the action that consumes the token with your app's usual pipeline.

Summary

Functions

Serves widget assets and handles the relative POST /challenge and POST /redeem paths.

Accepts the options supplied to the forwarded Plug.

Functions

call(conn, opts)

@spec call(Plug.Conn.t(), keyword()) :: Plug.Conn.t()

Serves widget assets and handles the relative POST /challenge and POST /redeem paths.

init(opts)

@spec init(keyword()) :: keyword()

Accepts the options supplied to the forwarded Plug.