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 modulepolicy
- policy module (defaults to context module)fallback
- fallback functionassigns
- action assignsuser
– can be a 1-arity function (or{module, function_name}
) that accepts the connection and returns the userkey
- the assign to set. Defaults to:action
Link to this section Summary
Link to this section Functions
Callback implementation for Plug.call/2
.
Callback implementation for Plug.init/1
.