01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
14: */
15:
16: package org.acegisecurity.ui;
17:
18: import org.acegisecurity.AuthenticationException;
19:
20: import java.io.IOException;
21:
22: import javax.servlet.ServletException;
23: import javax.servlet.ServletRequest;
24: import javax.servlet.ServletResponse;
25:
26: /**
27: * Used by {@link ExceptionTranslationFilter} to commence an authentication
28: * scheme.
29: *
30: * @author Ben Alex
31: * @version $Id: AuthenticationEntryPoint.java 1784 2007-02-24 21:00:24Z luke_t $
32: */
33: public interface AuthenticationEntryPoint {
34: //~ Methods ========================================================================================================
35:
36: /**
37: * Commences an authentication scheme.<P><code>SecurityEnforcementFilter</code> will populate the
38: * <code>HttpSession</code> attribute named
39: * <code>AuthenticationProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY</code> with the requested target URL before
40: * calling this method.</p>
41: * <P>Implementations should modify the headers on the <code>ServletResponse</code> as necessary to
42: * commence the authentication process.</p>
43: *
44: * @param request that resulted in an <code>AuthenticationException</code>
45: * @param response so that the user agent can begin authentication
46: * @param authException that caused the invocation
47: *
48: * @throws IOException DOCUMENT ME!
49: * @throws ServletException DOCUMENT ME!
50: */
51: void commence(ServletRequest request, ServletResponse response,
52: AuthenticationException authException) throws IOException,
53: ServletException;
54: }
|