Skip to content

Commit

Permalink
Improve jwt logging on failed auth
Browse files Browse the repository at this point in the history
Update docs/changelog/122247.yaml
  • Loading branch information
jfreden committed Feb 11, 2025
1 parent f52c59e commit bc2ab83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/122247.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 122247
summary: Improve jwt logging on failed auth
area: Authentication
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,10 @@ public void authenticate(final AuthenticationToken authenticationToken, final Ac
+ tokenPrincipal
+ "] with header ["
+ jwtAuthenticationToken.getSignedJWT().getHeader()
+ "] and claimSet ["
+ jwtAuthenticationToken.getJWTClaimsSet()
+ "]";

if (logger.isTraceEnabled()) {
logger.trace(msg, ex);
logger.trace(msg + " and claimSet [" + jwtAuthenticationToken.getJWTClaimsSet() + "]", ex);
} else {
logger.debug(msg + " Cause: " + ex.getMessage()); // only log the stack trace at trace level
}
Expand Down

0 comments on commit bc2ab83

Please sign in to comment.