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 This week: 2All time: 9,842 This week: 96Up
Version License PHP version Categories
dframe-token 1.0.0The PHP License7PHP 5, Security
Description 

Author

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: 233054 in Poland Poland
Week rank: 34 Up2 in Poland Poland Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Documentation

Dframe/Token - Component

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

php framework dframe logo

Composer

$ composer require dframe/token

Standalone


$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

License

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 README.md Doc. Documentation
Plain text file Token.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:95
This week:2
All time:9,842
This week:96Up