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

x/jose/util/decode_protected_header.ts>decodeProtectedHeader

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Extremely Popular
Latest
function decodeProtectedHeader
import { decodeProtectedHeader } from "https://deno.land/x/jose@v5.9.6/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.