mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
936 B
936 B
Function: decodeProtectedHeader
💗 Help the project
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.
â–¸ decodeProtectedHeader(token): ProtectedHeaderParameters
Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.
Parameters
| Name | Type | Description |
|---|---|---|
token |
string | object |
JWE/JWS/JWT token in any JOSE serialization. |
Returns
Example
const protectedHeader = jose.decodeProtectedHeader(token)
console.log(protectedHeader)