CsrfResponseFilterMiddleware
in package
implements
MiddlewareInterface
Adds support for CSRF attack mitigation by attaching identifiers to the valid response.
Interfaces, Classes, Traits and Enums
- MiddlewareInterface
Table of Contents
- __construct() : mixed
- process() : ResponseInterface
- Stores a *request validation token* in server state and attaches the token to the response.
Methods
__construct()
public
__construct(ResponseFilterInterface $responseFilter) : mixed
Parameters
- $responseFilter : ResponseFilterInterface
Return values
mixed —process()
Stores a *request validation token* in server state and attaches the token to the response.
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
The stored token SHOULD then be used to validate futher requests.
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface