Bodyguard.Plug.BuildAction (Bodyguard v2.4.2) View Source

Construct an Action on the connection.

The action is stored in conn.assigns.action for later access (configurable via the :key option).

Options

See Bodyguard.Action for descriptions of these fields.

  • context - context module
  • policy - policy module (defaults to context module)
  • fallback - fallback function
  • assigns - action assigns
  • user – can be a 1-arity function (or {module, function_name}) that accepts the connection and returns the user
  • key - the assign to set. Defaults to :action

Link to this section Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this section Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.