Interface: GuardHandlers<Req>
Defined in: packages/express/src/guards.ts:49
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
Req | Request |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
exposeRequirements? | boolean | Include the required roles/permissions in the default 403 body. Default: false (like spatie's display_permission_in_exception). | packages/express/src/guards.ts:58 |
onForbidden? | GuardHandler<Req> | Called when the subject lacks access. Default: 403 JSON. | packages/express/src/guards.ts:53 |
onUnauthenticated? | GuardHandler<Req> | Called when there is no subject (req.rbac is null). Default: 401 JSON. | packages/express/src/guards.ts:51 |
