Class CsrfLogoutHandler
java.lang.Object
org.springframework.security.web.csrf.CsrfLogoutHandler
- All Implemented Interfaces:
- LogoutHandler
CsrfLogoutHandler is in charge of removing the CsrfToken upon logout. A
 new CsrfToken will then be generated by the framework upon the next request.- Since:
- 3.2
- 
Constructor SummaryConstructorsConstructorDescriptionCsrfLogoutHandler(CsrfTokenRepository csrfTokenRepository) Creates a new instance
- 
Method SummaryModifier and TypeMethodDescriptionvoidlogout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable Authentication authentication) Clears theCsrfToken
- 
Constructor Details- 
CsrfLogoutHandlerCreates a new instance- Parameters:
- csrfTokenRepository- the- CsrfTokenRepositoryto use
 
 
- 
- 
Method Details- 
logoutpublic void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable Authentication authentication) Clears theCsrfToken- Specified by:
- logoutin interface- LogoutHandler
- Parameters:
- request- the HTTP request
- response- the HTTP response
- authentication- the current principal details
- See Also:
 
 
-