Commit 5a694292 authored by huyuchen's avatar huyuchen

cas修改

parent 594bccff
...@@ -54,10 +54,6 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter ...@@ -54,10 +54,6 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter
} else { } else {
AbstractAuthenticationToken authRequest; AbstractAuthenticationToken authRequest;
String casResult = request.getParameter("cas"); String casResult = request.getParameter("cas");
String username = this.obtainUsername(request);
username = username != null ? username : "";
username = username.trim();
if (Common.isNotNull(casResult)) { if (Common.isNotNull(casResult)) {
String ldapName = ""; String ldapName = "";
try { try {
...@@ -93,6 +89,9 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter ...@@ -93,6 +89,9 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter
} }
authRequest = new CasAuthenticationToken(ldapName, null); authRequest = new CasAuthenticationToken(ldapName, null);
} else { } else {
String username = this.obtainUsername(request);
username = username != null ? username : "";
username = username.trim();
String password = this.obtainPassword(request); String password = this.obtainPassword(request);
password = password != null ? decryptAES(password) : ""; password = password != null ? decryptAES(password) : "";
authRequest = new UsernamePasswordAuthenticationToken(username, password); authRequest = new UsernamePasswordAuthenticationToken(username, password);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment