Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 936 Bytes

util_decode_protected_header.decodeProtectedHeader.md

File metadata and controls

28 lines (17 loc) · 936 Bytes

Function: decodeProtectedHeader

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

ProtectedHeaderParameters

Example

const protectedHeader = jose.decodeProtectedHeader(token)
console.log(protectedHeader)