Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for high-precision decimal TimeClaims #96

Merged
merged 3 commits into from
Jan 11, 2025

Conversation

Nirusu
Copy link
Contributor

@Nirusu Nirusu commented Jan 10, 2025

Some authentication providers issue JWTs with a higher precision than just seconds.
For example, Laravel Passport uses time values in microseconds, using a decimal number to represent this value in the JWT.
Currently, JWT Editor cannot parse these values, and displays them as Invalid Values in the information field.

This PR adds support for parsing those decimal high-precision timestamps, converting the decimal part into nanoseconds and adding it as nanoAdjustment into the created Instant object.

@Nirusu Nirusu force-pushed the decimal-timeclaim branch from 4ff54c8 to 9e7366b Compare January 11, 2025 00:49
Copy link
Owner

@DolphFlynn DolphFlynn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. I really appreciate your contribution!

@DolphFlynn DolphFlynn merged commit 8c57c37 into DolphFlynn:main Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants