JwtConsumer has no way to override system clock
Issue #151
closed
When testing code that validates a JWT, it would be very useful to be able to pass in a frozen Clock instance so that tests can run against a static JWT with expiration time.
Comments (4)
-
-
Account Deactivated reporter Thanks, perfect 👌 I did not notice this option, was looking for setClock or something similar.
-
Account Deactivated reporter - changed status to resolved
-
repo owner - changed status to closed
- Log in to comment
There’s this: https://static.javadoc.io/org.bitbucket.b_c/jose4j/0.6.5/org/jose4j/jwt/consumer/JwtConsumerBuilder.html#setEvaluationTime(org.jose4j.jwt.NumericDate)
see also https://bitbucket.org/b_c/jose4j/issues/25/reusability-and-thread-safety-of