| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
| AuthenticationEntryPoint |
|
| 1.0;1 |
| 1 | /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited |
|
| 2 | * |
|
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 4 | * you may not use this file except in compliance with the License. |
|
| 5 | * You may obtain a copy of the License at |
|
| 6 | * |
|
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 | * |
|
| 9 | * 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 | /** |
|
| 28 | * Used by {@link ExceptionTranslationFilter} to commence an authentication |
|
| 29 | * scheme. |
|
| 30 | * |
|
| 31 | * @author Ben Alex |
|
| 32 | * @version $Id: AuthenticationEntryPoint.java 1784 2007-02-24 21:00:24Z luke_t $ |
|
| 33 | */ |
|
| 34 | public interface AuthenticationEntryPoint { |
|
| 35 | //~ Methods ======================================================================================================== |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Commences an authentication scheme.<P><code>SecurityEnforcementFilter</code> will populate the |
|
| 39 | * <code>HttpSession</code> attribute named |
|
| 40 | * <code>AuthenticationProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY</code> with the requested target URL before |
|
| 41 | * calling this method.</p> |
|
| 42 | * <P>Implementations should modify the headers on the <code>ServletResponse</code> as necessary to |
|
| 43 | * commence the authentication process.</p> |
|
| 44 | * |
|
| 45 | * @param request that resulted in an <code>AuthenticationException</code> |
|
| 46 | * @param response so that the user agent can begin authentication |
|
| 47 | * @param authException that caused the invocation |
|
| 48 | * |
|
| 49 | * @throws IOException DOCUMENT ME! |
|
| 50 | * @throws ServletException DOCUMENT ME! |
|
| 51 | */ |
|
| 52 | void commence(ServletRequest request, ServletResponse response, AuthenticationException authException) |
|
| 53 | throws IOException, ServletException; |
|
| 54 | } |