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    
Last Updated Ratings Unique User Downloads Download Rankings
2020-09-12 (14 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 68 This week: 1All time: 9,719 This week: 267Up
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: 10 packages by
Country: Poland Poland
Age: ???
All time rank: 314275 in Poland Poland
Week rank: 17 Up1 in Poland Poland Up

Details

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:68
This week:1
All time:9,719
This week:267Up

For more information send a message to info at phpclasses dot org.