Skip to content

Commit 90f095d

Browse files
Reduce JWT failed validation logging
1 parent dac5b32 commit 90f095d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/uid2/shared/attest/JwtService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ public JwtValidationResponse validateJwt(String jwt, String audience, String iss
8484

8585
// return the first verified response
8686
return response;
87-
} catch (TokenVerifier.VerificationException e) {
88-
LOGGER.info("Error validating JWT. Error message: {}", e.getMessage());
89-
lastException = e;
9087
} catch (Exception e) {
91-
LOGGER.warn("Error thrown verifying token", e);
9288
lastException = e;
9389
}
9490
}
9591

92+
if (!response.getIsValid()) {
93+
LOGGER.error("Error validating JWT", lastException);
94+
}
95+
9696
response.setValidationException(lastException);
9797
return response;
9898
}

0 commit comments

Comments
 (0)