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

# Class CrossOriginOpenerPolicyServerHttpHeadersWriter

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

All Implemented Interfaces:
  `ServerHttpHeadersWriter`

public final class CrossOriginOpenerPolicyServerHttpHeadersWriter extends Object implements ServerHttpHeadersWriter
Inserts Cross-Origin-Opener-Policy header.

Since:
  5.7
See Also:
  - Cross-Origin-Opener-Policy

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`CrossOriginOpenerPolicyServerHttpHeadersWriter.CrossOriginOpenerPolicy`

## Field Summary

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

## Constructor Summary

Constructors
Constructor
Description
`CrossOriginOpenerPolicyServerHttpHeadersWriter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`setPolicy(CrossOriginOpenerPolicyServerHttpHeadersWriter.CrossOriginOpenerPolicy openerPolicy)`
Sets the `CrossOriginOpenerPolicyServerHttpHeadersWriter.CrossOriginOpenerPolicy` value to be used in the `Cross-Origin-Opener-Policy` header
`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

### OPENER_POLICY

public static final String OPENER_POLICY

See Also:
  - Constant Field Values

## Constructor Details

### CrossOriginOpenerPolicyServerHttpHeadersWriter

public CrossOriginOpenerPolicyServerHttpHeadersWriter()

## Method Details

### setPolicy

public void setPolicy(CrossOriginOpenerPolicyServerHttpHeadersWriter.CrossOriginOpenerPolicy openerPolicy)
Sets the `CrossOriginOpenerPolicyServerHttpHeadersWriter.CrossOriginOpenerPolicy` value to be used in the `Cross-Origin-Opener-Policy` header

Parameters:
  `openerPolicy` - the `CrossOriginOpenerPolicyServerHttpHeadersWriter.CrossOriginOpenerPolicy` to use

### 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)`.