JwtClaimsPolicy
JwtClaimsPolicy
Claims policy for verifyJwt. Application authorization stays with the caller.
ts
interface JwtClaimsPolicy {
readonly issuer: string | readonly string[] | Unchecked;
readonly audience: string | readonly string[] | Unchecked;
readonly requiredClaims?: readonly string[];
readonly now?: () => Date;
readonly clockToleranceSeconds?: number;
readonly maxAgeSeconds?: number;
readonly futureIssuedAt?: FutureIssuedAtPolicy;
}Properties
readonlyissuer:string|readonlystring``[]|Unchecked— Acceptedissvalues (any one may match), or{ unchecked: true }.readonlyaudience:string|readonlystring``[]|Unchecked— Acceptedaudvalues (any one may match), or{ unchecked: true }.readonlyrequiredClaims?:readonlystring``[]— Claims that must be present. Default['exp'].readonlynow?: () =>Date— The clock. Default is the system time.readonlyclockToleranceSeconds?:number— Leeway in seconds forexp,nbfandiat, from 0 to 600. Default0.readonlymaxAgeSeconds?:number— Oldest acceptable token age in seconds, measured fromiat. Requiresiat.readonlyfutureIssuedAt?:FutureIssuedAtPolicy— Whetheriatafter the clock is accepted. Default'reject'.