Skip to main content
Module

x/faster/deps.ts>jwtVerify

A fast and optimized middleware server with an absurdly small amount of code (300 lines) built on top of Deno's native HTTP APIs with no dependencies. It also has a collection of useful middlewares: log file, serve static, CORS, session, rate limit, token, body parsers, redirect, proxy and handle upload. In "README" there are examples of all the resources. Faster's ideology is: all you need is an optimized middleware manager, all other functionality is middleware.
Go to Latest
function jwtVerify
import { jwtVerify } from "https://deno.land/x/faster@v7.6/deps.ts";

Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the JWT Claims Set.

Parameters

jwt: string | Uint8Array

JSON Web Token value (encoded as JWS).

key: KeyLike | Uint8Array

Key to verify the JWT with. See Algorithm Key Requirements.

optional
options: JWTVerifyOptions

JWT Decryption and JWT Claims Set validation options.

Returns

Promise<JWTVerifyResult>

Type Parameters

optional
T extends KeyLike = KeyLike

Parameters

jwt: string | Uint8Array

JSON Web Token value (encoded as JWS).

getKey: JWTVerifyGetKey

Function resolving a key to verify the JWT with. See Algorithm Key Requirements.

optional
options: JWTVerifyOptions

JWT Decryption and JWT Claims Set validation options.

Returns

Promise<JWTVerifyResult & ResolvedKey<T>>