Renamed form and openID filters to shorten names
This commit is contained in:
+4
-4
@@ -30,7 +30,7 @@ import org.springframework.security.authentication.AuthenticationServiceExceptio
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationProcessingFilter;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.springframework.util.StringUtils;
|
||||
* @since 2.0
|
||||
* @see OpenIDAuthenticationProvider
|
||||
*/
|
||||
public class OpenIDAuthenticationProcessingFilter extends AbstractAuthenticationProcessingFilter {
|
||||
public class OpenIDAuthenticationFilter extends AbstractAuthenticationProcessingFilter {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
public static final String DEFAULT_CLAIMED_IDENTITY_FIELD = "j_username";
|
||||
@@ -76,7 +76,7 @@ public class OpenIDAuthenticationProcessingFilter extends AbstractAuthentication
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public OpenIDAuthenticationProcessingFilter() {
|
||||
public OpenIDAuthenticationFilter() {
|
||||
super("/j_spring_openid_security_check");
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class OpenIDAuthenticationProcessingFilter extends AbstractAuthentication
|
||||
HttpSession session = request.getSession(false);
|
||||
|
||||
if (session != null || getAllowSessionCreation()) {
|
||||
request.getSession().setAttribute(UsernamePasswordAuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY, username);
|
||||
request.getSession().setAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY, username);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -13,13 +13,13 @@ import org.junit.Test;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.springframework.security.MockAuthenticationManager;
|
||||
import org.springframework.security.openid.OpenIDAuthenticationProcessingFilter;
|
||||
import org.springframework.security.openid.OpenIDAuthenticationFilter;
|
||||
import org.springframework.security.openid.OpenIDConsumerException;
|
||||
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
|
||||
|
||||
public class OpenIDAuthenticationProcessingFilterTests {
|
||||
|
||||
OpenIDAuthenticationProcessingFilter filter;
|
||||
OpenIDAuthenticationFilter filter;
|
||||
private static final String REDIRECT_URL = "http://www.example.com/redirect";
|
||||
private static final String CLAIMED_IDENTITY_URL = "http://www.example.com/identity";
|
||||
private static final String REQUEST_PATH = "/j_spring_openid_security_check";
|
||||
@@ -28,7 +28,7 @@ public class OpenIDAuthenticationProcessingFilterTests {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
filter = new OpenIDAuthenticationProcessingFilter();
|
||||
filter = new OpenIDAuthenticationFilter();
|
||||
filter.setConsumer(new MockOpenIDConsumer(REDIRECT_URL));
|
||||
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
|
||||
filter.setAuthenticationSuccessHandler(new SavedRequestAwareAuthenticationSuccessHandler());
|
||||
|
||||
Reference in New Issue
Block a user