You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit testing classes with expiring tokens with this library is difficult because it is tied to System.currentTimeMillis() in multiple places. I use JodaTime, which has a number of features which make unit testing easier, including freezing the joda clock at a specified time. I would like to inject the time for iat/exp on creation, and for verifying exp, such that it can be made to work with this Joda functionality.
I am already setting iat/exp manually to leverage this feature, but it doesn't seem possible to do so for verification at this time.
The text was updated successfully, but these errors were encountered:
@chadjaros the path of lesser resistance is to make clock public and figure out how to inject it and avoid people messing with this since it's meant only for testing. So if you are able please submit a PR for allowing to define a clock
Unit testing classes with expiring tokens with this library is difficult because it is tied to
System.currentTimeMillis()
in multiple places. I use JodaTime, which has a number of features which make unit testing easier, including freezing the joda clock at a specified time. I would like to inject the time for iat/exp on creation, and for verifying exp, such that it can be made to work with this Joda functionality.I am already setting iat/exp manually to leverage this feature, but it doesn't seem possible to do so for verification at this time.
The text was updated successfully, but these errors were encountered: