Package org.springframework.security.web.server.header

# Class ClearSiteDataServerHttpHeadersWriter

java.lang.Object
org.springframework.security.web.server.header.ClearSiteDataServerHttpHeadersWriter

All Implemented Interfaces:
  `ServerHttpHeadersWriter`

public final class ClearSiteDataServerHttpHeadersWriter extends Object implements ServerHttpHeadersWriter

Writes the `Clear-Site-Data` response header when the request is secure.

For further details please consult W3C Documentation.

Since:
  5.2

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`ClearSiteDataServerHttpHeadersWriter.Directive`
Represents the directive values expected by the `ClearSiteDataServerHttpHeadersWriter`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CLEAR_SITE_DATA_HEADER`

## Constructor Summary

Constructors
Constructor
Description
`ClearSiteDataServerHttpHeadersWriter(ClearSiteDataServerHttpHeadersWriter.Directive... directives)`
Constructs a new instance using the given directives.

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)`
Write the headers to the response.

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

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

## Field Details

### CLEAR_SITE_DATA_HEADER

public static final String CLEAR_SITE_DATA_HEADER

See Also:
  - Constant Field Values

## Constructor Details

### ClearSiteDataServerHttpHeadersWriter

public ClearSiteDataServerHttpHeadersWriter(ClearSiteDataServerHttpHeadersWriter.Directive... directives)

Constructs a new instance using the given directives.

Parameters:
  `directives` - directives that will be written as the header value
Throws:
  `IllegalArgumentException` - if the argument is null or empty

## Method Details

### writeHttpHeaders

public reactor.core.publisher.Mono<Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface: `ServerHttpHeadersWriter`
Write the headers to the response.

Specified by:
  `writeHttpHeaders` in interface `ServerHttpHeadersWriter`
Returns:
  A Mono which is returned to the `Supplier` of the `ReactiveHttpOutputMessage.beforeCommit(Supplier)`.