NoCSRF, a simple PHP7 token class to prevent CSRF attacks.
- 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' );