Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 1.92 KB

jwt_verify.JWTVerifyGetKey.md

File metadata and controls

36 lines (21 loc) · 1.92 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.

Callable

JWTVerifyGetKey

JWTVerifyGetKey(protectedHeader, token): Uint8Array | KeyLike | Promise<Uint8Array | KeyLike>

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

If you cannot match a key suitable for the token, throw an error instead.

Parameters

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

Returns

Uint8Array | KeyLike | Promise<Uint8Array | KeyLike>