Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/faster/vendor/jose/util/decode_protected_header.ts>decodeProtectedHeader

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. Fully compatible with Deno Deploy.
Latest
function decodeProtectedHeader
import { decodeProtectedHeader } from "https://deno.land/x/faster@v11.7/vendor/jose/util/decode_protected_header.ts";

Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.

This function is exported (as a named export) from the main 'jose' module entry point as well as from its subpath export 'jose/decode/protected_header'.

Parameters

token: string | object

JWE/JWS/JWT token in any JOSE serialization.