interface JwtOptions
Since 0.1.0

JWT configuration options.

Properties

readonly
optional
secret: string | Uint8Array

Secret key for HS256 algorithm. Required if RS256 keys not provided.

readonly
optional
privateKey: string

Private key for RS256 signing (PEM format). Required if HS256 secret not provided.

readonly
optional
publicKey: string

Public key for RS256 verification (PEM format). Required for RS256 verification.

readonly
optional
algorithm: "HS256" | "RS256"

Algorithm to use. Inferred from key material if omitted.

readonly
optional
audience: string

Expected audience for verification.

readonly
optional
issuer: string

Expected issuer for verification.

readonly
optional
header: string

Header name for token extraction (default: 'authorization').

readonly
optional
scheme: string

Token scheme prefix (default: 'bearer').

Optional shared store that rejects revoked typed access credentials. Supply the same instance to RefreshTokenService for logout invalidation.

Usage

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