@suluk/hono - v0.1.5
    Preparing search index...

    Interface IdentityConfig

    Read identity from a request — the app supplies these (it owns its principal/scope model).

    interface IdentityConfig {
        principal: (c: Context) => string | null | undefined;
        isAdmin?: (c: Context) => boolean;
        scopes?: (c: Context) => string[] | undefined;
    }

    Hierarchy (View Summary)

    Index

    Properties

    principal: (c: Context) => string | null | undefined

    the caller's verified principal id, or null/undefined for anonymous.

    isAdmin?: (c: Context) => boolean

    fast-path admin check (verified). If omitted, the literal "admin" scope is used.

    scopes?: (c: Context) => string[] | undefined

    the caller's granted scopes (e.g. ["admin"], ["org:1:read"]). Default: none.