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.
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.