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 (Yesterday) RSS 2.0 feedNot yet rated by the usersTotal: 3 This week: 3All time: 10,064 This week: 122Up
Version License PHP version Categories
dframe-token 1.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: 8 packages by
Country: Poland Poland

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:3
This week:3
All time:10,064
This week:122Up

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