Package org.springframework.security.config.annotation.web.configurers

# Class HeadersConfigurer.CrossOriginEmbedderPolicyConfig

java.lang.Object
org.springframework.security.config.annotation.web.configurers.HeadersConfigurer.CrossOriginEmbedderPolicyConfig

Enclosing class:
  HeadersConfigurer<H extends HttpSecurityBuilder<H>>

public final class HeadersConfigurer.CrossOriginEmbedderPolicyConfig extends Object

## Constructor Summary

Constructors
Constructor
Description
`CrossOriginEmbedderPolicyConfig()`

## Method Summary

Modifier and Type
Method
Description
`HeadersConfigurer<H>`
`and()`
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0.
`HeadersConfigurer<H>.CrossOriginEmbedderPolicyConfig`
`policy(org.springframework.security.web.header.writers.CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy embedderPolicy)`
Sets the policy to be used in the `Cross-Origin-Embedder-Policy` header

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

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

## Constructor Details

### CrossOriginEmbedderPolicyConfig

public CrossOriginEmbedderPolicyConfig()

## Method Details

### policy

public HeadersConfigurer<H>.CrossOriginEmbedderPolicyConfig policy(org.springframework.security.web.header.writers.CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy embedderPolicy)
Sets the policy to be used in the `Cross-Origin-Embedder-Policy` header

Parameters:
  `embedderPolicy` - a `Cross-Origin-Embedder-Policy`
Returns:
  the `HeadersConfigurer<H extends HttpSecurityBuilder<H>>.CrossOriginEmbedderPolicyConfig` for additional configuration
Throws:
  `IllegalArgumentException` - if embedderPolicy is null

### and

@Deprecated(since="6.1", forRemoval=true) public HeadersConfigurer<H> and()
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0. Use `HeadersConfigurer.crossOriginEmbedderPolicy(Customizer)` instead
Allows completing configuration of Cross-Origin-Embedder-Policy and continuing configuration of headers.

Returns:
  the `HeadersConfigurer` for additional configuration