PHP code example of sincco / tokenizer

1. Go to this page and download the library: Download sincco/tokenizer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sincco / tokenizer example snippets



Sincco\Tools;

$userData = [ 'idUser'=>666, 'emailUser'=>'[email protected]' ];
$password = "p4$sw0rD";
$minutesExpiration = 10;
echo Tokenizer::create( $userData, $password, $minutesExpiration );


Sincco\Tools;

$password = "p4$sw0rD";
$valid = Tokenizer::validate( $token, $password );