public class CsrfProtectionFilter extends Object implements ClientRequestFilter
org.glassfish.jersey.server.filter.CsrfProtectionFilter
on the server side.| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_NAME
Name of the header this filter will attach to the request.
|
| Constructor and Description |
|---|
CsrfProtectionFilter()
Creates a new instance of the filter with X-Requested-By header value set to empty string.
|
CsrfProtectionFilter(String requestedBy)
Initialized the filter with a desired value of the X-Requested-By header.
|
| Modifier and Type | Method and Description |
|---|---|
void |
filter(ClientRequestContext rc)
Filter method called before a request has been dispatched to a client
transport layer.
|
public static final String HEADER_NAME
public CsrfProtectionFilter()
public CsrfProtectionFilter(String requestedBy)
requestedBy - Desired value of X-Requested-By header the filter
will be adding for all potentially state changing requests.public void filter(ClientRequestContext rc) throws IOException
ClientRequestFilterjavax.annotation.Priority
class-level annotation value.filter in interface ClientRequestFilterrc - request context.IOException - if an I/O exception occurs.Copyright © 2007-2019, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.