interface IPrincipal
Since 0.1.0

The authenticated identity attached to a request by authentication middleware.

Properties

readonly
id: string

Stable subject identifier.

readonly
optional
roles: readonly string[]

Role names held by the principal.

readonly
optional
permissions: readonly string[]

Permission names held by the principal.

readonly
optional
claims: Readonly<Record<string, unknown>>

Additional claims from the credential.

Usage

import { type IPrincipal } from "auth-plugin/src/index.ts";