DownloadDframe/Token - Component
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 |