Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public static final class SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor
- Object
- SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor
ImplementsRequestPostProcessor
SecurityMockMvcRequestPostProcessors.csrf(), to refine.
The chain is told what token to expect for this one request, so no page
has to be fetched first. The names are the defaults – the _csrf
parameter and the X-CSRF-TOKEN header – whichever repository the chain
uses.
Methods
Inherited methods
Method details
asHeader
public SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor asHeader()Sends the token in the
X-CSRF-TOKEN header instead of a parameter.useInvalidToken
public SecurityMockMvcRequestPostProcessors.CsrfRequestPostProcessor useInvalidToken()Sends a token that is not the expected one, to see it refused.
postProcessRequest
public MockRequestBuilder postProcessRequest(MockRequestBuilder request)The request to send:
request changed, usually.