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

exp claim doesnt support scientific notation #706

Open
5 tasks done
ajayd942 opened this issue Jan 21, 2025 · 0 comments
Open
5 tasks done

exp claim doesnt support scientific notation #706

ajayd942 opened this issue Jan 21, 2025 · 0 comments
Labels
bug This points to a verified bug in the code

Comments

@ajayd942
Copy link

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

If we have a jwt token, with exp claim value as

"exp": 1.733162101e+26,

the library fails to decode the token. We get a JWTDecodeException with error "The claim 'exp' contained a non-numeric date value."

According the RFC on JWT(https://datatracker.ietf.org/doc/html/rfc7519#section-2), a NumericDate should adhere to IEEE Std 1003, according to which scientific notation representation is valid.

Reproduction

  1. Create a jwt token with exp claim in scientific notation.
  2. Try to decode the token. It will fail with "The claim 'exp' contained a non-numeric date value."

Additional context

No response

java-jwt version

4.4.0

Java version

17

@ajayd942 ajayd942 added the bug This points to a verified bug in the code label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant