Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 2.39 KB

File metadata and controls

30 lines (18 loc) · 2.39 KB

Interface: JWTVerifyGetKey()

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.

Interface for JWT Verification dynamic key resolution. No token components have been verified at the time of this function call.

See

createRemoteJWKSet to verify using a remote JSON Web Key Set.

JWTVerifyGetKey(protectedHeader, token): Uint8Array | CryptoKey | JWK | KeyObject | Promise<Uint8Array | CryptoKey | JWK | KeyObject>

Dynamic key resolution function. No token components have been verified at the time of this function call.

If a suitable key for the token cannot be matched, throw an error instead.

Parameters

Parameter Type Description
protectedHeader JWTHeaderParameters JWE or JWS Protected Header.
token FlattenedJWSInput The consumed JWE or JWS token.

Returns

Uint8Array | CryptoKey | JWK | KeyObject | Promise<Uint8Array | CryptoKey | JWK | KeyObject>