org.acegisecurity.ui.rememberme
public class RememberMeProcessingFilter extends java.lang.Object implements javax.servlet.Filter, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware
Authentication
object in the SecurityContext
, and populates it
with a remember-me authentication token if a RememberMeServices
implementation so requests.Concrete RememberMeServices
implementations will have their RememberMeServices.autoLogin(HttpServletRequest, HttpServletResponse)
method
called by this filter. The Authentication
or null
returned by that method will be placed
into the SecurityContext
. The AuthenticationManager
will be used, so that any concurrent
session management or other authentication-specific behaviour can be achieved. This is the same pattern as with
other authentication mechanisms, which call the AuthenticationManager
as part of their contract.
If authentication is successful, an InteractiveAuthenticationSuccessEvent
will be published to the application
context. No events will be published if authentication was unsuccessful, because this would generally be recorded
via an AuthenticationManager
-specific application event.
Do not use this class directly. Instead configure web.xml
to use the FilterToBeanProxy
.
Constructor and Description |
---|
RememberMeProcessingFilter() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy()
Does nothing - we rely on IoC lifecycle services instead.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
RememberMeServices |
getRememberMeServices() |
void |
init(javax.servlet.FilterConfig ignored)
Does nothing - we rely on IoC lifecycle services instead.
|
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher) |
void |
setAuthenticationManager(AuthenticationManager authenticationManager) |
void |
setRememberMeServices(RememberMeServices rememberMeServices) |
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
java.io.IOException
javax.servlet.ServletException
public RememberMeServices getRememberMeServices()
public void init(javax.servlet.FilterConfig ignored) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
ignored
- not usedjavax.servlet.ServletException
- DOCUMENT ME!public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
setApplicationEventPublisher
in interface org.springframework.context.ApplicationEventPublisherAware
public void setAuthenticationManager(AuthenticationManager authenticationManager)
public void setRememberMeServices(RememberMeServices rememberMeServices)
Copyright © 2004-2014 Interface21, Inc. All Rights Reserved.