Slim-Middleware
Slim-Middleware copied to clipboard
Added improved implementation of CSRF guard with ajax protection
Added CSRF guard with request header check, compatible with AngularJS cookie & header names by default.
Added configuration options including action on token check fail to address issues like this: http://help.slimframework.com/discussions/questions/912-catch-csrf-error
Added helpers for Twig to ease template updates and jQuery configuration
Personally I think you are better off creating separate repository and composer package. That way there will be only one middleware in the commit history. People can also choose which middleware they install instead of installing bunch of unrelated middlewares at once.
This PR intended as a full replacement of CsrfGuard from Slim-Extras for this repo. If I understand correctly, this repo is a replacement for middleware part of deprecated Slim-Extras. Correct me if I am wrong. My intention was to rewrite old CsrfGuard from scratch and fix all of its issues.