Skip to content

Class: JWTVerifier ​

Defined in: jwt.ts:179

Verifies quantum-safe-py-compatible JWTs.

Constructors ​

Constructor ​

new JWTVerifier(publicKey, options?): JWTVerifier

Defined in: jwt.ts:185

Parameters ​

publicKey ​

PublicKey

options? ​

JwtVerifierOptions = {}

Returns ​

JWTVerifier

Properties ​

algorithm ​

readonly algorithm: SignatureAlgorithm

Defined in: jwt.ts:180

Methods ​

verify() ​

verify(token, options?): JwtClaims

Defined in: jwt.ts:202

Verifies the signature, then the exp/nbf/iss/aud claims, and returns the claims.

Parameters ​

token ​

string

options? ​

JwtVerifyOptions = {}

Returns ​

JwtClaims

Throws ​

for an invalid signature or failed claim check (no detail, by design).

Throws ​

if the token is structurally malformed.

Throws ​

if the header alg differs from the key's algorithm.

Apache-2.0.