Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Issue/17 #20

Open
wants to merge 1 commit into
base: experimental
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion auth/src/main/java/com/gewia/common/auth/jwt/JwtUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public Pair<DecodedJWT, VerificationResult> 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);
Expand Down