ns_crypto::JWT method decode (public)

 <instance of ns_crypto::JWT[i]> decode token

Defined in

Decode a JSON Web Token (JWT) without performing signature verification. The method splits the token into its three components, decodes the protected header and payload from base64url, and parses them as JSON. The signature part is returned as raw binary data.

Parameters:
token (required)
JWT string in compact serialization format ("header.payload.signature").
Returns:
A Tcl dictionary with the following keys: header — parsed JWT header as Tcl dictionary payload — parsed JWT payload as Tcl dictionary signature — raw binary signature (empty for "alg=none")

Testcases:
No testcase defined.
[ show source ]
Show another procedure: