Libraries
    Preparing search index...

    Interface JwtSchemeOptions<T>

    Configuration for jwtScheme.

    interface JwtSchemeOptions<T> {
        algorithms?: string[];
        audience?: string;
        clockTolerance?: number;
        issuer?: string;
        mapClaims: (claims: JwtPayload) => T;
        name?: string;
        secret: string | Buffer<ArrayBufferLike>;
    }

    Type Parameters

    • T

      The type of the principal value produced by mapClaims.

    Index

    Properties

    algorithms?: string[]

    Allowed algorithms (default: ['HS256']).

    audience?: string

    Expected audience — if set, aud must include it.

    clockTolerance?: number

    Clock tolerance in seconds for exp/nbf checks (default: 0).

    issuer?: string

    Expected issuer — if set, iss must match.

    mapClaims: (claims: JwtPayload) => T

    Map raw JWT claims to the typed principal value.

    name?: string

    Custom scheme name (default: 'jwt').

    secret: string | Buffer<ArrayBufferLike>

    HMAC secret (for HS256/HS384/HS512) or PEM public key (for RS256/RS384/RS512).