org.acegisecurity.ui.logout
Class SecurityContextLogoutHandler

java.lang.Object
  extended by org.acegisecurity.ui.logout.SecurityContextLogoutHandler
All Implemented Interfaces:
LogoutHandler, Ordered

public class SecurityContextLogoutHandler
extends Object
implements LogoutHandler, Ordered

Performs a logout by modifying the SecurityContextHolder.

Will also invalidate the HttpSession if isInvalidateHttpSession() is true and the session is not null.

Version:
$Id: SecurityContextLogoutHandler.java 1784 2007-02-24 21:00:24Z luke_t $
Author:
Ben Alex

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
SecurityContextLogoutHandler()
           
 
Method Summary
 int getOrder()
           
 boolean isInvalidateHttpSession()
           
 void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
          Requires the request to be passed in.
 void setInvalidateHttpSession(boolean invalidateHttpSession)
          Causes the HttpSession to be invalidated when this LogoutHandler is invoked.
 void setOrder(int order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityContextLogoutHandler

public SecurityContextLogoutHandler()
Method Detail

logout

public void logout(HttpServletRequest request,
                   HttpServletResponse response,
                   Authentication authentication)
Requires the request to be passed in.

Specified by:
logout in interface LogoutHandler
Parameters:
request - from which to obtain a HTTP session (cannot be null)
response - not used (can be null)
authentication - not used (can be null)

isInvalidateHttpSession

public boolean isInvalidateHttpSession()

setInvalidateHttpSession

public void setInvalidateHttpSession(boolean invalidateHttpSession)
Causes the HttpSession to be invalidated when this LogoutHandler is invoked. Defaults to true.

Parameters:
invalidateHttpSession - true if you wish the session to be invalidated (default) or false if it should not be

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

setOrder

public void setOrder(int order)


Copyright © 2004-2007 Interface21, Inc. All Rights Reserved.