Interface: RbacPluginOptions<T>
Defined in: packages/fastify/src/plugin.ts:64
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | DefaultRbacTypes |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
getSubject | (request) => MaybePromise<Subject | null | undefined> | Resolves the authenticated subject for this request (e.g. from request.user or a session). Return null / undefined for guests. | packages/fastify/src/plugin.ts:71 |
guard? | string | Guard name (e.g. web or api). Defaults to the engine's defaultGuard. | packages/fastify/src/plugin.ts:73 |
hook? | RbacHook | Hook in which the subject is resolved. It must run after your authentication. Default: 'preHandler' (runs before route-level preHandler guards). | packages/fastify/src/plugin.ts:80 |
rbac | Rbac<T> | The RBAC engine created with createRbac(...). | packages/fastify/src/plugin.ts:66 |
team? | (request) => MaybePromise<TeamId | undefined> | Resolves the current team (only when the engine was created with teams: true). | packages/fastify/src/plugin.ts:75 |
