Class PermissionsPolicyServerHttpHeadersWriter
- java.lang.Object
-
- org.springframework.security.web.server.header.PermissionsPolicyServerHttpHeadersWriter
-
- All Implemented Interfaces:
ServerHttpHeadersWriter
public final class PermissionsPolicyServerHttpHeadersWriter extends java.lang.Object implements ServerHttpHeadersWriter
Writes thePermissions-Policy
response header with configured policy directives.- Since:
- 5.5
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PERMISSIONS_POLICY
-
Constructor Summary
Constructors Constructor Description PermissionsPolicyServerHttpHeadersWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setPolicy(java.lang.String policy)
Set the policy to be used in the response header.reactor.core.publisher.Mono<java.lang.Void>
writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
Write the headers to the response.
-
-
-
Field Detail
-
PERMISSIONS_POLICY
public static final java.lang.String PERMISSIONS_POLICY
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeHttpHeaders
public reactor.core.publisher.Mono<java.lang.Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface:ServerHttpHeadersWriter
Write the headers to the response.- Specified by:
writeHttpHeaders
in interfaceServerHttpHeadersWriter
- Returns:
- A Mono which is returned to the
Supplier
of theReactiveHttpOutputMessage.beforeCommit(Supplier)
.
-
setPolicy
public void setPolicy(java.lang.String policy)
Set the policy to be used in the response header.- Parameters:
policy
- the policy- Throws:
java.lang.IllegalArgumentException
- if policy isnull
-
-