1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.intercept.web;
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 /***
28 * Used by {@link SecurityEnforcementFilter} to commence an authentication
29 * scheme.
30 *
31 * @author Ben Alex
32 * @version $Id: AuthenticationEntryPoint.java,v 1.4 2005/11/17 00:55:50 benalex Exp $
33 */
34 public interface AuthenticationEntryPoint {
35
36
37 /***
38 * Commences an authentication scheme.
39 *
40 * <P>
41 * <code>SecurityEnforcementFilter</code> will populate the
42 * <code>HttpSession</code> attribute named
43 * <code>AuthenticationProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY</code>
44 * with the requested target URL before calling this method.
45 * </p>
46 *
47 * <P>
48 * Implementations should modify the headers on the
49 * <code>ServletResponse</code> as necessary to commence the
50 * authentication process.
51 * </p>
52 *
53 * @param request that resulted in an <code>AuthenticationException</code>
54 * @param response so that the user agent can begin authentication
55 * @param authException that caused the invocation
56 */
57 public void commence(ServletRequest request, ServletResponse response,
58 AuthenticationException authException)
59 throws IOException, ServletException;
60 }