auth0 / java-jwt

Java implementation of JSON Web Token (JWT)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support java.time instead of or alongside java.utils.date

Lalaluka opened this issue · comments

Describe the problem you'd like to have solved

The library still uses java.utils.date instead of the newer java.time API
A change towards java.time or support alongside utils.date would be great for developer convenience.

Describe the ideal solution

Something similar to #392

Alternatives and current work-arounds

--

Additional information, if any

I have seen that there have been questions about this feature in the past. But the last activity on the Topic has been in late 2020 and the Version4 Branch seems to be inactive for some time. So I took the freedom to create a new Issue, sorry if there are any external resources I overlooked. I think #421 also shines a good light on the topic.

Thanks @Lalaluka! We may be able add newer java.time APIs alongside the existing Date APIs in the current release stream, by adding some new methods to the various interfaces to support new APIs that have a default implementation. I can explore this further; anyone willing to try it out once I have something? Thanks!

Of course!
If it helps I'm happy to test/review once you have something :)

After further investigation, we have a few other changes and fixes that are going to go into v4, and supporting Instant will build on some of those changes. We're targeting a v4 release in the first half of the year. You can see the change (similar to the previous change on the 4.0.0-DEV branch, which we'll remove in favor of v4-dev) in #537

Hello 👋

We have fixed this behaviour in our latest v4.0.0-beta.0 release. We will close this issue now. Please try the new release and provide your feedback. Please note that there are changes in the library's behaviour in the new major and check out our Migration Guide to migrate your library.