Iskra API Reference
    Preparing search index...

    Interface JwtGateOptions<A>

    interface JwtGateOptions<A extends Actor> {
        algorithms?: string[];
        audience?: string | string[];
        issuer?: string;
        jwksUri?: string;
        secret?: string;
        toActor?: (claims: JWTPayload, c: Context) => A | Promise<A | null> | null;
    }

    Type Parameters

    Index
    algorithms?: string[]

    Algorithms accepted. Default ['HS256'] with secret, ['RS256'] with jwksUri.

    audience?: string | string[]

    The aud a token must have (one of them).

    issuer?: string

    The iss a token must have.

    jwksUri?: string

    Or the keys of an identity provider: its JWKS URL (they are fetched and cached by Hono).

    secret?: string

    The key of tokens signed with one key: an HMAC secret, or a public key.

    toActor?: (claims: JWTPayload, c: Context) => A | Promise<A | null> | null

    The actor from the claims; null refuses the token. Default: { kind: 'user', id: sub, scopes, claims }.