@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Interface JwtValidationOptions

    Options for validateJwt.

    All fields are optional — only the checks whose options are provided will be executed.

    interface JwtValidationOptions {
        audience?: string;
        clockToleranceSeconds?: number;
        issuer?: string;
        nowSeconds?: number;
        requiredClaims?: readonly string[];
        requireSubject?: boolean;
    }
    Index

    Properties

    audience?: string

    If set, the token's aud claim must include this value.

    clockToleranceSeconds?: number

    Clock tolerance in seconds for exp and nbf checks. Defaults to 0.

    issuer?: string

    If set, the token's iss claim must match this value.

    nowSeconds?: number

    Reference timestamp in seconds since epoch for time-based checks. Defaults to Math.floor(Date.now() / 1000).

    requiredClaims?: readonly string[]

    Additional claim names that must be present in the payload.

    requireSubject?: boolean

    If true, the token must have a sub claim.