Skip to content

Commit

Permalink
chore(): print last 4 chars of login token if error
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsfs committed Mar 13, 2024
1 parent 0a29814 commit 015ea5d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)
authenticatedPrincipal = securityPortalClient.authz(t.getUsername(), new String(t.getPassword()));
LOGGER.info("Successfully authenticated {}", t.getUsername());
} catch (SecurityPortalException e) {
LOGGER.warn("Failed authentication", e);
String errToken = new String(t.getPassword());
if (errToken.length() > 4) {
errToken = errToken.substring(errToken.length() - 4);
}

LOGGER.warn("Failed authentication for token ***{}", errToken);
LOGGER.debug("Detailed authentication error", e);
return null;
}

Expand Down

0 comments on commit 015ea5d

Please sign in to comment.