jblond / nocsrf
NoCSRF is a simple anti-CSRF token generation/checking class written in PHP.
v1.7
2020-12-01 13:28 UTC
Requires
- php: >= 7.1
Requires (Dev)
README
- Author: Thibaut Despoulain
- Author: Mario
- Version:
- Licensed under the MIT license
Usage
For usage see the example/exmaple.php
Public functions
- check
- enableOriginCheck
- generate
<?php $csfr = new jblond\Nocsrf; $csfr->check('csrf_token', $_POST, $throwException = false, $time_span = null, $multiple = false); $csfr->enableOriginCheck(); // optional $csfr->generate( 'csrf_token' );