Package org.springframework.security.config.web.server

# Class ServerHttpSecurity.HeaderSpec.PermissionsPolicySpec

java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.HeaderSpec.PermissionsPolicySpec

Enclosing class:
  ServerHttpSecurity.HeaderSpec

public final class ServerHttpSecurity.HeaderSpec.PermissionsPolicySpec extends Object
Configures `Permissions-Policy` response header.

Since:
  5.5
See Also:
  - `ServerHttpSecurity.HeaderSpec.permissionsPolicy()`

## Method Summary

Modifier and Type
Method
Description
`ServerHttpSecurity.HeaderSpec`
`and()`
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0.
`ServerHttpSecurity.HeaderSpec.PermissionsPolicySpec`
`policy(String policy)`
Sets the policy to be used in the response header.

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

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

## Method Details

### policy

public ServerHttpSecurity.HeaderSpec.PermissionsPolicySpec policy(String policy)
Sets the policy to be used in the response header.

Parameters:
  `policy` - a permissions policy
Returns:
  the `ServerHttpSecurity.HeaderSpec.PermissionsPolicySpec` to continue configuring

### and

@Deprecated(since="6.1", forRemoval=true) public ServerHttpSecurity.HeaderSpec and()
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0. Use `ServerHttpSecurity.HeaderSpec.permissionsPolicy(Customizer)` instead
Allows method chaining to continue configuring the `ServerHttpSecurity`.

Returns:
  the `ServerHttpSecurity.HeaderSpec` to continue configuring