AshAuthentication.Phoenix.Oauth2Server.ConsentView (ash_authentication_oauth2_server v0.1.0)

Copy Markdown View Source

Default HTML consent screen.

An app can ship a custom consent screen by configuring its own module exporting render(:consent, assigns) and passing it to the router as consent_view: MyApp.MyConsentView.

Assigns

  • :client_name — registered client display name
  • :client_id — UUID (for display)
  • :redirect_uri — where approval will redirect (for display)
  • :scope — the space-separated scope string requested (for display)
  • :resource — the resource URL the token will bind to (for display)
  • :action_path — POST destination for the consent form
  • :csrf_token — CSRF token to embed
  • :consent_request — sealed token capturing the validated request; the POST handler reconstructs all protocol fields from this rather than trusting form-submitted values.

Summary

Functions

Render the consent screen as a binary HTML body.

Functions

render(atom, assigns)

@spec render(:consent, map()) :: iodata()

Render the consent screen as a binary HTML body.

render_consent(assigns)