Interface: RbacPluginOptions<T, G>
Defined in: packages/elysia/src/plugin.ts:43
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | DefaultRbacTypes |
G extends string | DefaultGuardName<T> |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
getSubject | (ctx) => MaybePromise<Subject | null | undefined> | Resolves the authenticated subject for this request (e.g. from a session cookie or a JWT payload). Return null / undefined for guests. | packages/elysia/src/plugin.ts:50 |
guard? | G | Guard name (e.g. web or api). Defaults to the engine's defaultGuard. With per-guard names, it must be one of the typed guards, and the rbac context value gets its names. | packages/elysia/src/plugin.ts:55 |
name? | string | Plugin name, used by Elysia to register it once. Default: 'rbac-evolution'. Give each instance its own name when you register two (e.g. a web and an api guard). | packages/elysia/src/plugin.ts:62 |
rbac | Rbac<T> | The RBAC engine created with createRbac(...). Its typed names flow into the rbac context value. | packages/elysia/src/plugin.ts:45 |
team? | (ctx) => MaybePromise<TeamId | undefined> | Resolves the current team (only when the engine was created with teams: true). | packages/elysia/src/plugin.ts:57 |
