JWTDecode
Method Signature
JWTDecode( token )Arguments
Argument
Type
Required
Description
Default
Returns
Examples
decoded = jwtDecode( token );
kid = decoded.header.kid; // e.g. "v2"
alg = decoded.header.alg; // e.g. "RS256"
sub = decoded.payload.sub; // claims are readable without verification
// Typical kid-dispatch pattern
decoded = jwtDecode( token );
key = getKeyById( decoded.header.kid );
payload = jwtVerify( token, key, decoded.header.alg );Related
Last updated
Was this helpful?
