Documentation

Csrf
in package
implements MiddlewareInterface

Validates that request has proper forgery protection token.

Must be called only if the request is called within existing Plesk session. Returns HTTP 403 if forgery protection check has failed.

Tags
since
18.0.41

Interfaces, Classes and Traits

MiddlewareInterface

Table of Contents

__construct()  : mixed
process()  : ResponseInterface

Methods

__construct()

public __construct(ResponseFactoryInterface $factory[, array<string|int, mixed> $limitMethods = ['POST', 'PUT', 'PATCH', 'DELETE'] ]) : mixed
Parameters
$factory : ResponseFactoryInterface
$limitMethods : array<string|int, mixed> = ['POST', 'PUT', 'PATCH', 'DELETE']

Limit token check to the specified HTTP methods (default: [POST, PUT, PATCH, DELETE])

Return values
mixed

process()

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

Search results