Skip to content

Commit dd5b9f3

Browse files
committed
refactor request info collection
1 parent 9940f8f commit dd5b9f3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/main/java/com/app/config/GenerateTokenForUserFilter.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,8 @@ public Authentication attemptAuthentication(HttpServletRequest request, HttpServ
4242
String password = userJSON.getString("password");
4343
String browser = request.getHeader("User-Agent")!= null?request.getHeader("User-Agent"):"";
4444
String ip = request.getRemoteAddr();
45-
String forwardIp = request.getHeader("x-forwarded-fo")!= null?request.getHeader("x-forwarded-fo"):"";
46-
47-
log.info("ip:{}, \nproxy-ip:{} \nbrowser:{} \nuser:{} \npwd:{} \n----",
48-
request.getRemoteAddr(),
49-
request.getHeader("x-forwarded-for"),
50-
request.getHeader("User-Agent"),
51-
username,
52-
password
53-
);
45+
log.info("\nip:{} \nbrowser:{} \nuser:{} \npwd:{} \n----",ip,browser,username,password);
46+
5447
//final UsernamePasswordAuthenticationToken loginToken = new UsernamePasswordAuthenticationToken("demo", "demo");
5548
final UsernamePasswordAuthenticationToken authToken = new UsernamePasswordAuthenticationToken(username, password);
5649
return getAuthenticationManager().authenticate(authToken); // This will take to successfulAuthentication or faliureAuthentication function

0 commit comments

Comments
 (0)