jwt icon indicating copy to clipboard operation
jwt copied to clipboard

Add option to change time precision for creation/parsing tokens.

Open ajermaky opened this issue 7 months ago • 5 comments

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

ajermaky avatar Jul 23 '24 18:07 ajermaky