View Javadoc
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.springframework.security.ui.logout;
17  
18  import org.springframework.security.Authentication;
19  
20  import javax.servlet.http.HttpServletRequest;
21  import javax.servlet.http.HttpServletResponse;
22  
23  
24  /**
25   * Indicates a class that is able to participate in logout handling.
26   *
27   * <p>
28   * Called by {@link LogoutFilter}.
29   *
30   * @author Ben Alex
31   * @version $Id: LogoutHandler.java 2142 2007-09-21 18:18:21Z luke_t $
32   */
33  public interface LogoutHandler {
34      //~ Methods ========================================================================================================
35  
36      /**
37       * Causes a logout to be completed. The method must complete successfully.
38       *
39       * @param request the HTTP request
40       * @param response the HTTP resonse
41       * @param authentication the current principal details
42       */
43      void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication);
44  }