Package org.springframework.security.web.authentication.logout

# Class HeaderWriterLogoutHandler

java.lang.Object
org.springframework.security.web.authentication.logout.HeaderWriterLogoutHandler

All Implemented Interfaces:
  `LogoutHandler`

public final class HeaderWriterLogoutHandler extends Object implements LogoutHandler

Since:
  5.2

## Constructor Summary

Constructors
Constructor
Description
`HeaderWriterLogoutHandler(HeaderWriter headerWriter)`
Constructs a new instance using the passed `HeaderWriter` implementation

## Method Summary

Modifier and Type
Method
Description
`void`
`logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)`
Causes a logout to be completed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HeaderWriterLogoutHandler

public HeaderWriterLogoutHandler(HeaderWriter headerWriter)
Constructs a new instance using the passed `HeaderWriter` implementation

Parameters:
  `headerWriter` -
Throws:
  `IllegalArgumentException` - if headerWriter is null.

## Method Details

### logout

public void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
Description copied from interface: `LogoutHandler`
Causes a logout to be completed. The method must complete successfully.

Specified by:
  `logout` in interface `LogoutHandler`
Parameters:
  `request` - the HTTP request
  `response` - the HTTP response
  `authentication` - the current principal details