Method Web.decode_jwt()
- Method decode_jwt
mapping(string:string|int) decode_jwt(Crypto.Sign|array(Crypto.Sign) sign, string(7bit) jwt)
- Description
Decode a JSON Web Token (JWT).
- Parameter sign
The public key(s) to validate the jwt against.
- Parameter jwt
A JWT as eg returned by encode_jwt().
- Returns
Returns
0
(zero) on validation failure (this includes validation of expiry times).Returns a mapping of the claims for the token on success. See RFC 7519 section 4.
- Note
The time check of the
"nbf"
value has a hard coded 60 second grace time (as allowed by RFC 7519 section 4.1.5).- See also