Open dricair opened 6 months ago
It's required if you don't turn it off in the https://docs.rs/jsonwebtoken/latest/jsonwebtoken/struct.Validation.html struct
Yes I agree, but it would be a lot easier to show it in the example, as it's only when testing that it tells it is required.
I tried to implement tests containing the code present in the doc for encode and decode.
But it triggers an error because "exp" claim is missing. It took me quite some time to understand that we need to explicitly add this field to the Claim structure. I think the doc should be updated to show it. Something like this for encode: