Wikimedia SlimApp
Common classes to help with creating an application using the Slim micro framework and Twig template engine.
Loading...
Searching...
No Matches
Wikimedia\Slimapp\CsrfMiddleware Class Reference

Middleware to manage Cross Site Request Forgery (CSRF) mitigation. More...

+ Inheritance diagram for Wikimedia\Slimapp\CsrfMiddleware:
+ Collaboration diagram for Wikimedia\Slimapp\CsrfMiddleware:

Public Member Functions

 call ()
 Handle CSRF validation and view injection.
 

Detailed Description

Middleware to manage Cross Site Request Forgery (CSRF) mitigation.

Ensures that the user's session contains a random CSRF token. Verifies that HTTP requests using POST, PUT and DELETE verbs provide a parameter that matches the user's unique CSRF token. Exports 'csrf_param' and 'csrf_token' values to the view that can be used to generate appropriate form inputs.

Author
Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g

The documentation for this class was generated from the following file: