PHP Classes

Dframe PHP CSRF Token Library: Generate tokens to protect against CSRF attacks

Recommend this page to a friend!
  Info   View files Documentation   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 95 All time: 9,856 This week: 455Up
Version License PHP version Categories
dframe-token 1.0.0The PHP License7PHP 5, Security


This package can generate tokens to protect against CSRF attacks.

It can generate a token string that can be used in Web pages to avoid Cross-Site Request forgery attacks. The generated token strings can be stored using in different storage containers using a given driver class object.

The package can also retrieve a token from the storage container accessed with the driver object to verify if it is valid.

Picture of Slawomir Kaleta
  Performance   Level  
Name: Slawomir Kaleta <contact>
Classes: 15 packages by
Country: Poland Poland
Age: ???
All time rank: 233155 in Poland Poland
Week rank: 73 Up2 in Poland Poland Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x


Dframe/Token - Component

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

php framework dframe logo


$ composer require dframe/token


$driver = new \Dframe\Session\Session('sessionName');

 * $driver Can be any class implements interface \Psr\SimpleCache\CacheInterface 
$token  = new \Dframe\Token\Token($driver); 
$key = $token->generate('evidenceToken')->get('evidenceToken');  // Generate hash
$isValid = $token->isValid('evidenceToken', $key);            // Return true/false
$has = $token->has('evidenceToken');            // Return true/false


Open-sourced software licensed under the MIT license

  Files folder image Files  
File Role Description
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Doc. Documentation
Plain text file Token.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,856
This week:455Up