Documentation

CsrfRequestCheckMiddleware
in package
implements MiddlewareInterface

Takes care of request validation logic for CSRF attack mitigation

Interfaces, Classes, Traits and Enums

MiddlewareInterface

Table of Contents

__construct()  : mixed
process()  : ResponseInterface
Produces a response for an invalid request or delegates request handling to the provided handler.

Methods

__construct()

public __construct(RequestHandlerInterface $csrfCheckHandler) : mixed
Parameters
$csrfCheckHandler : RequestHandlerInterface
Return values
mixed

process()

Produces a response for an invalid request or delegates request handling to the provided handler.

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface

if the request fails the check, this middleware will return a canned response with a response that is either Method Not Allowed, Bad Request or Forbidden.

Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

Search results