2017 © Pedro Peláez
 

library csrf-token

csrf token class

image

thanhtaivtt/csrf-token

csrf token class

  • Friday, May 4, 2018
  • by thanhtaivtt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

CSRF Token class

Usage

  • Init class:
// init class
$csrf = new CSRF();
//or
$csrf = CSRF::init();
  • Get token:
// get token value
$csrf->getToken() // output: 4607dd1f13b2b92370c48e9b7ea90feb

  • Get token field:
$csrf->getInput() // output: <input type="hidden" name="_token" value="4607dd1f13b2b92370c48e9b7ea90feb">

  • Validate request:
$ss->validate() // return true if valid

Notes

  • This class only works when the server configuration ENV variable _PROTECT_CSRF = true

The Versions

04/05 2018

dev-master

9999999-dev

csrf token class

  Sources   Download

MIT

04/05 2018

2.0.0

2.0.0.0

csrf token class

  Sources   Download

MIT

02/08 2017

1.0.0

1.0.0.0

csrf token class

  Sources   Download

MIT