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

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

Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.