Documents for @litert/jwt / Algorithms/Mldsa / MldsaJwaVerifier
Class: MldsaJwaVerifier
Defined in: src/lib/Algorithms/Mldsa.ts:181
The signature validator using ML-DSA algorithm, for JWT.
Example
import * as LibJWT from '@litert/jwt';
const verifier = new LibJWT.MldsaJwaVerifier({
publicKey: '-----BEGIN PUBLIC KEY-----\n...',
});
const result = await LibJWT.parse({
token: '...',
verifier: verifier,
});
console.log(result);Implements
Constructors
Constructor
new MldsaJwaVerifier(
opts):MldsaJwaVerifier
Defined in: src/lib/Algorithms/Mldsa.ts:207
Parameters
opts
Returns
MldsaJwaVerifier
Properties
checkAlgClaim
checkAlgClaim:
boolean
Defined in: src/lib/Algorithms/Mldsa.ts:200
Whether to check the alg claim in the JWT header if it is present.
digestType
readonlydigestType:EDigestType=cL.EDigestType.AUTO
Defined in: src/lib/Algorithms/Mldsa.ts:205
The digest type to use for verification.
family
readonlyfamily:ESigningAlgoFamily=cL.ESigningAlgoFamily.MLDSA
Defined in: src/lib/Algorithms/Mldsa.ts:188
The signing algorithm family.
jwa
readonlyjwa:ESigningJwa
Defined in: src/lib/Algorithms/Mldsa.ts:193
The JWA algorithm name.
name
readonlyname:string
Defined in: src/lib/Algorithms/Mldsa.ts:183
The name of the validator.
When using with the JwtVerifier class, this name can be used to identify which validator failed.
Implementation of
Methods
validate()
validate(
data):void
Defined in: src/lib/Algorithms/Mldsa.ts:219
Validate the provided parse result of a JWT, checking if the JWT is valid.
Parameters
data
Returns
void
Throws
If validation failed or an error occurred inside.