Interface: GuardHandlers<C>
Defined in: packages/elysia/src/guards.ts:50
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
C | GuardHandlerContext |
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/elysia/src/guards.ts:59 |
onForbidden? | GuardHandler<C> | Called when the subject lacks access. Default: 403 JSON. | packages/elysia/src/guards.ts:54 |
onUnauthenticated? | GuardHandler<C> | Called when there is no subject (rbac is null). Default: 401 JSON. | packages/elysia/src/guards.ts:52 |
