public class

SecurityContextLogoutHandler

extends Object
implements LogoutHandler
java.lang.Object
   ↳ org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler

Class Overview

Performs a logout by modifying the SecurityContextHolder.

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

Summary

Fields
protected final Log logger
Public Constructors
SecurityContextLogoutHandler()
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.web.authentication.logout.LogoutHandler

Fields

protected final Log logger

Public Constructors

public SecurityContextLogoutHandler ()

Public Methods

public boolean isInvalidateHttpSession ()

public void logout (HttpServletRequest request, HttpServletResponse response, Authentication authentication)

Requires the request to be passed in.

Parameters
request from which to obtain a HTTP session (cannot be null)
response not used (can be null)
authentication not used (can be null)

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.