浏览代码

SEEC-255: Always create HttpSession before calling AuthenticationDetailsSource.

Ben Alex 19 年之前
父节点
当前提交
d8a56d4e60
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      core/src/main/java/org/acegisecurity/ui/webapp/AuthenticationProcessingFilter.java

+ 3 - 3
core/src/main/java/org/acegisecurity/ui/webapp/AuthenticationProcessingFilter.java

@@ -72,13 +72,13 @@ public class AuthenticationProcessingFilter extends AbstractProcessingFilter {
         UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username,
                 password);
 
-        // Allow subclasses to set the "details" property
-        setDetails(request, authRequest);
-
         // Place the last username attempted into HttpSession for views
         request.getSession()
                .setAttribute(ACEGI_SECURITY_LAST_USERNAME_KEY, username);
 
+        // Allow subclasses to set the "details" property
+        setDetails(request, authRequest);
+
         return this.getAuthenticationManager().authenticate(authRequest);
     }