SEC-1058: Substantial refactoring of AbstractProcessingFilter to use AuthenticationFailureHandler strategy. Also changed attemptAuthentication method to take a response object and have the option of returning null, to allow OpenIDAuthenticationProcessingFilter to work without having to throw exceptions between the template methods (which made the logic very hard to follow). The OpenID filter now redirects to the OpenID provider service from this method, rather than treating it as a temporary failure and throwing OpenIDAuthenticationRequiredException.
This commit is contained in:
@@ -29,16 +29,6 @@ public class OpenIDAuthenticationProcessingFilterTests extends TestCase {
|
||||
filter.afterPropertiesSet();
|
||||
}
|
||||
|
||||
public void testNoIdentityCausesException() throws Exception {
|
||||
try {
|
||||
MockHttpServletRequest req = new MockHttpServletRequest();
|
||||
filter.attemptAuthentication(req);
|
||||
fail("OpenIDAuthenticationRequiredException expected, no openid.identity parameter");
|
||||
} catch (OpenIDAuthenticationRequiredException e) {
|
||||
//cool
|
||||
}
|
||||
}
|
||||
|
||||
public void testFilterOperation() throws Exception {
|
||||
MockHttpServletRequest req = new MockHttpServletRequest("GET", REQUEST_PATH);
|
||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||
|
||||
Reference in New Issue
Block a user