|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.filter.GenericFilterBean
org.springframework.security.web.authentication.logout.LogoutFilter
public class LogoutFilter
Logs a principal out.
Polls a series of LogoutHandler
s. The handlers should be specified in the order they are required.
Generally you will want to call logout handlers TokenBasedRememberMeServices
and
SecurityContextLogoutHandler
(in that order).
After logout, a redirect will be performed to the URL determined by either the configured LogoutSuccessHandler or the logoutSuccessUrl, depending on which constructor was used.
Field Summary |
---|
Fields inherited from class org.springframework.web.filter.GenericFilterBean |
---|
logger |
Constructor Summary | |
---|---|
LogoutFilter(LogoutSuccessHandler logoutSuccessHandler,
LogoutHandler... handlers)
Constructor which takes a LogoutSuccessHandler instance to determine the target destination after logging out. |
|
LogoutFilter(String logoutSuccessUrl,
LogoutHandler... handlers)
|
Method Summary | |
---|---|
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
|
protected String |
getFilterProcessesUrl()
Deprecated. |
protected boolean |
requiresLogout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Allow subclasses to modify when a logout should take place. |
void |
setFilterProcessesUrl(String filterProcessesUrl)
Deprecated. |
void |
setLogoutRequestMatcher(RequestMatcher logoutRequestMatcher)
|
Methods inherited from class org.springframework.web.filter.GenericFilterBean |
---|
addRequiredProperty, afterPropertiesSet, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogoutFilter(LogoutSuccessHandler logoutSuccessHandler, LogoutHandler... handlers)
public LogoutFilter(String logoutSuccessUrl, LogoutHandler... handlers)
Method Detail |
---|
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected boolean requiresLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- the requestresponse
- the response
true
if logout should occur, false
otherwisepublic void setLogoutRequestMatcher(RequestMatcher logoutRequestMatcher)
@Deprecated public void setFilterProcessesUrl(String filterProcessesUrl)
@Deprecated protected String getFilterProcessesUrl()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |