org.springframework.security.concurrent
Class ConcurrentSessionFilter
java.lang.Object
org.springframework.security.ui.SpringSecurityFilter
org.springframework.security.concurrent.ConcurrentSessionFilter
- All Implemented Interfaces:
- Filter, InitializingBean, Ordered
public class ConcurrentSessionFilter
- extends SpringSecurityFilter
- implements InitializingBean
Filter required by concurrent session handling package.
This filter performs two functions. First, it calls
SessionRegistry.refreshLastRequest(String)
for each request
so that registered sessions always have a correct "last update" date/time. Second, it retrieves a
SessionInformation
from the SessionRegistry
for each request and checks if the session has been marked as expired.
If it has been marked as expired, the configured logout handlers will be called (as happens with
LogoutFilter
), typically to invalidate the session.
A redirect to the expiredURL specified will be performed, and the session invalidation will cause an
HttpSessionDestroyedEvent
to be published via the
HttpSessionEventPublisher
registered in web.xml
.
- Version:
- $Id$
- Author:
- Ben Alex
ConcurrentSessionFilter
public ConcurrentSessionFilter()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
doFilterHttp
public void doFilterHttp(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
throws IOException,
ServletException
- Specified by:
doFilterHttp
in class SpringSecurityFilter
- Throws:
IOException
ServletException
determineExpiredUrl
protected String determineExpiredUrl(HttpServletRequest request,
SessionInformation info)
setExpiredUrl
public void setExpiredUrl(String expiredUrl)
setSessionRegistry
public void setSessionRegistry(SessionRegistry sessionRegistry)
setLogoutHandlers
public void setLogoutHandlers(LogoutHandler[] handlers)
getOrder
public int getOrder()
- Specified by:
getOrder
in interface Ordered
Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.