|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.client.filter.CsrfProtectionFilter
public class CsrfProtectionFilter
Simple client-side filter that adds X-Requested-By headers to all state-changing
request (i.e. request for methods other than GET, HEAD and OPTIONS).
This is to satisfy the requirements of the CsrfProtectionFilter
on the server side.
CsrfProtectionFilter| Field Summary | |
|---|---|
static String |
HEADER_NAME
Name of the header this filter will attach to the request. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
filter(ClientRequestContext rc)
Filter method called before a request has been dispatched to a client transport layer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HEADER_NAME
| Constructor Detail |
|---|
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.| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||