Skip to content

Commit

Permalink
Polish UsernamePasswordAuthenticationFilter method
Browse files Browse the repository at this point in the history
Closes gh-10970
  • Loading branch information
shin-mallang authored and eleftherias committed Mar 16, 2022
1 parent cf29bf9 commit 7955e5a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public Authentication attemptAuthentication(HttpServletRequest request, HttpServ
throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod());
}
String username = obtainUsername(request);
username = (username != null) ? username : "";
username = username.trim();
username = (username != null) ? username.trim() : "";
String password = obtainPassword(request);
password = (password != null) ? password : "";
UsernamePasswordAuthenticationToken authRequest = UsernamePasswordAuthenticationToken.unauthenticated(username,
Expand Down

0 comments on commit 7955e5a

Please sign in to comment.