Class CsrfLogoutHandler
- java.lang.Object
-
- org.springframework.security.web.csrf.CsrfLogoutHandler
-
- All Implemented Interfaces:
LogoutHandler
public final class CsrfLogoutHandler extends java.lang.Object implements LogoutHandler
CsrfLogoutHandler
is in charge of removing theCsrfToken
upon logout. A newCsrfToken
will then be generated by the framework upon the next request.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description CsrfLogoutHandler(CsrfTokenRepository csrfTokenRepository)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Authentication authentication)
Clears theCsrfToken
-
-
-
Constructor Detail
-
CsrfLogoutHandler
public CsrfLogoutHandler(CsrfTokenRepository csrfTokenRepository)
Creates a new instance- Parameters:
csrfTokenRepository
- theCsrfTokenRepository
to use
-
-
Method Detail
-
logout
public void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Authentication authentication)
Clears theCsrfToken
- Specified by:
logout
in interfaceLogoutHandler
- Parameters:
request
- the HTTP requestresponse
- the HTTP responseauthentication
- the current principal details- See Also:
LogoutHandler.logout(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.springframework.security.core.Authentication)
-
-