dframe / token
Token component Dframe
v4.1.8
2022-01-30 11:58 UTC
Requires
- php: >=7.3
- ext-json: *
- psr/simple-cache: ^1.0
Requires (Dev)
- dframe/session: ^4.1
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-03-28 15:32:04 UTC
README
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