diff --git a/auth/src/main/java/com/gewia/common/auth/jwt/JwtUtil.java b/auth/src/main/java/com/gewia/common/auth/jwt/JwtUtil.java index 0e36e79..0163837 100644 --- a/auth/src/main/java/com/gewia/common/auth/jwt/JwtUtil.java +++ b/auth/src/main/java/com/gewia/common/auth/jwt/JwtUtil.java @@ -68,7 +68,8 @@ public Pair verify(String token) { return Pair.of(null, VerificationResult.UNKNOWN); } - if (jwt.getExpiresAt().before(Date.from(Instant.now()))) return Pair.of(jwt, VerificationResult.EXPIRED); + if (jwt.getExpiresAt() != null && jwt.getExpiresAt().before(Date.from(Instant.now()))) + return Pair.of(jwt, VerificationResult.EXPIRED); try { jwt = verifier.verify(jwt);