jwt
jwt copied to clipboard
Add option to change time precision for creation/parsing tokens.
We can currently change the precision of timestamps getting serialized by modifying TimePrecision
here.
However we are running into an issue where we have to serialize/validate different jwt tokens of various precisions (i.e. seconds, milliseconds).
As a work around, we are creating our own version of jwt.RegisteredClaims
that serializes/deserializes times based on the precision that we want. However it would be nice if we can include a time precision option in jwt.New
or jwt.ParseWithClaims