PHP Classes

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

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 95 All time: 9,868 This week: 455Up
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: 16 packages by
Country: Poland Poland
Age: ???
All time rank: 230953 in Poland Poland
Week rank: 49 Up1 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 (3)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:95
This week:0
All time:9,868
This week:455Up