diff --git a/openid/src/main/java/org/springframework/security/openid/OpenIDAuthenticationFilter.java b/openid/src/main/java/org/springframework/security/openid/OpenIDAuthenticationFilter.java index 4522981ec7..af347eb367 100644 --- a/openid/src/main/java/org/springframework/security/openid/OpenIDAuthenticationFilter.java +++ b/openid/src/main/java/org/springframework/security/openid/OpenIDAuthenticationFilter.java @@ -123,8 +123,6 @@ public class OpenIDAuthenticationFilter extends AbstractAuthenticationProcessing if (!StringUtils.hasText(identity)) { String claimedIdentity = obtainUsername(request); - // Make the username available to the view - setLastUsername(claimedIdentity, request); try { String returnToUrl = buildReturnToUrl(request); @@ -159,21 +157,9 @@ public class OpenIDAuthenticationFilter extends AbstractAuthenticationProcessing // delegate to the authentication provider Authentication authentication = this.getAuthenticationManager().authenticate(token); - if (authentication.isAuthenticated()) { - setLastUsername(token.getIdentityUrl(), request); - } - return authentication; } - private void setLastUsername(String username, HttpServletRequest request) { - HttpSession session = request.getSession(false); - - if (session != null || getAllowSessionCreation()) { - request.getSession().setAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY, username); - } - } - protected String lookupRealm(String returnToUrl) { String mapping = realmMapping.get(returnToUrl); diff --git a/sandbox/heavyduty/src/main/webapp/login.jsp b/sandbox/heavyduty/src/main/webapp/login.jsp index 8a7abb57e1..fbe58d7204 100755 --- a/sandbox/heavyduty/src/main/webapp/login.jsp +++ b/sandbox/heavyduty/src/main/webapp/login.jsp @@ -23,8 +23,8 @@