Removed Ordered interface from Http403EntryPoint (unused).

This commit is contained in:
Luke Taylor 2009-09-14 16:06:15 +00:00
parent 897960cd70
commit e7486fc203
2 changed files with 4 additions and 27 deletions

View File

@ -1,8 +1,5 @@
package org.springframework.security.web.authentication; package org.springframework.security.web.authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletException; import javax.servlet.ServletException;
@ -11,7 +8,8 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.core.Ordered; import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
/** /**
* <p> * <p>
@ -34,11 +32,9 @@ import org.springframework.core.Ordered;
* @author Ruud Senden * @author Ruud Senden
* @since 2.0 * @since 2.0
*/ */
public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint, Ordered { public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint {
private static final Log logger = LogFactory.getLog(Http403ForbiddenEntryPoint.class); private static final Log logger = LogFactory.getLog(Http403ForbiddenEntryPoint.class);
private int order = Integer.MAX_VALUE;
/** /**
* Always returns a 403 error code to the client. * Always returns a 403 error code to the client.
*/ */
@ -51,12 +47,5 @@ public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint, Ord
httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied"); httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied");
} }
public int getOrder() {
return order;
}
public void setOrder(int i) {
order = i;
}
} }

View File

@ -13,18 +13,7 @@ import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
/** public class Http403ForbiddenEntryPointTests extends TestCase {
*
* @author TSARDD
* @since 18-okt-2007
*/
public class PreAuthenticatedProcessingFilterEntryPointTests extends TestCase {
public void testGetSetOrder() {
Http403ForbiddenEntryPoint fep = new Http403ForbiddenEntryPoint();
fep.setOrder(333);
assertEquals(fep.getOrder(), 333);
}
public void testCommence() { public void testCommence() {
MockHttpServletRequest req = new MockHttpServletRequest(); MockHttpServletRequest req = new MockHttpServletRequest();
@ -38,6 +27,5 @@ public class PreAuthenticatedProcessingFilterEntryPointTests extends TestCase {
} catch (ServletException e) { } catch (ServletException e) {
fail("Unexpected exception thrown: "+e); fail("Unexpected exception thrown: "+e);
} }
} }
} }