▸ decodeProtectedHeader(token
): ProtectedHeaderParameters
Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.
example
Usage
const protectedHeader = decodeProtectedHeader(token)
console.log(protectedHeader)
example
ESM import
import { decodeProtectedHeader } from 'jose'
example
CJS import
const { decodeProtectedHeader } = require('jose')
example
Deno import
import { decodeProtectedHeader } from 'https://deno.land/x/[email protected]/index.ts'
Name | Type | Description |
---|---|---|
token |
string | object |
JWE/JWS/JWT token in any JOSE serialization. |