This function adds an auth guard to your API. Notably, this does
not turn on auth for any of your handlers but makes it available
for reference in an auth flow. To use it, reference it in the
auth_flow argument of functions supporting it. Guards are
defined using the various guard_*() constructors in the fireproof package.
Refer to these for further documentation
Usage
api_auth_guard(api, guard, name = NULL)
Value
This functions return the api object allowing for easy chaining
with the pipe
Arguments
api
A plumber2 api object to add the authenticator to
guard
A Guard subclass object defining an
authentication scheme
name
The name to use for referencing the guard in an authentication
flow
Using annotation
To add a guard to your api defined in an annotated file use the
@authGuard tag: