public class CustomHeaderFilter extends Object implements jakarta.ws.rs.container.ContainerRequestFilter, jakarta.ws.rs.client.ClientRequestFilter
On the client side, appends a new custom request header with a configured name and value to each outgoing request.
On the server side, validates that each request has a custom header with a configured name and value. If the validation fails a HTTP 403 response is returned.
| Constructor and Description |
|---|
CustomHeaderFilter(String headerName,
String headerValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
filter(jakarta.ws.rs.client.ClientRequestContext ctx) |
void |
filter(jakarta.ws.rs.container.ContainerRequestContext ctx) |
public void filter(jakarta.ws.rs.container.ContainerRequestContext ctx)
throws IOException
filter in interface jakarta.ws.rs.container.ContainerRequestFilterIOExceptionpublic void filter(jakarta.ws.rs.client.ClientRequestContext ctx)
throws IOException
filter in interface jakarta.ws.rs.client.ClientRequestFilterIOExceptionCopyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.