jblond/nocsrf

NoCSRF is a simple anti-CSRF token generation/checking class written in PHP.

v1.7 2020-12-01 13:28 UTC

This package is auto-updated.

Last update: 2024-10-29 05:34:33 UTC


README

Code Climate SensioLabsInsight

  • Author: Thibaut Despoulain
  • Author: Mario
  • Version: Latest 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' );