Uses the default BodyParser
, but can be overridden with the ActionBuilder
interface.
Requires the AsyncAuth component for resolving a user.
Attempts to verify if the user is authenticated before invoking the block
function.
Attempts to verify if the user is authenticated before invoking the block
function.
The incoming request from the user.
A function to invoke. e.g. The body of a controller method.
Returns the result of the block
function, with updated cookies if the user is authenticated.
Uses the default BodyParser
, but can be overridden with the ActionBuilder
interface.
Uses the default BodyParser
, but can be overridden with the ActionBuilder
interface.
An
ActionBuilder
that can be used for actions where authentication is optional. The endpoints that use this action will be publically accessible, but you may alter the behavior depending on whether or not a user is present.To use, you can simply just inject this component into your controller with a specified Env type.
The environment type of your application.