gisostallenberg / fixed-token
There is no license information available for the latest version (1.0.0) of this package.
Generates and verifies tokens based on a secret and some public data
1.0.0
2017-01-27 15:41 UTC
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2024-12-24 05:10:07 UTC
README
Generate and verify tokens based on a secret and some public data
Installation
composer require gisostallenberg/fixed-token
Usage example
<?php use GisoStallenberg\FixedToken\FixedToken; $secret = 'oxQu/H2FZLOK2elkfle8bg./eg'; $data = array( 'username' => 'giso', ); $token = FixedToken::create($secret) ->addData($data) ->generate(); FixedToken::create($secret) ->addData($data) ->verify($token); // should return true