Expiry check
@@ -117,8 +117,11 @@ public class JWTProviderLifetimeTest extends org.junit.Assert {
JwsJwtCompactConsumer jwtConsumer = new JwsJwtCompactConsumer(token);
JwtToken jwt = jwtConsumer.getJwtToken();
assertEquals(jwt.getClaim(JwtConstants.CLAIM_ISSUED_AT), providerResponse.getCreated().getEpochSecond());
- }
+ Instant now = Instant.now();
+ Long expiry = (Long)jwt.getClaim(JwtConstants.CLAIM_EXPIRY);
+ Instant.ofEpochSecond(expiry).isAfter(now);
+ }
/**
* Issue JWT token with a with a lifetime
