Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/blocks/commons/jwt/deps.ts>djwt.decode

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
function djwt.decode
import { djwt } from "https://deno.land/x/blocks@1.63.13/commons/jwt/deps.ts";
const { decode } = djwt;

Takes a jwt and returns a 3-tuple [unknown, unknown, Uint8Array] if the jwt has a valid serialization. Otherwise it throws an Error. This function does not verify the digital signature.

Type Parameters

optional
PayloadType extends Payload | unknown = unknown

Parameters

jwt: string

Returns

[unknown, PayloadType, Uint8Array]