PHP code example of yakubenko / jtokens
1. Go to this page and download the library: Download yakubenko/jtokens 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/ */
yakubenko / jtokens example snippets
use Yakubenko\JTokens\JTokens;
$jtoken = new JTokens();
$jtoken->setSecretKey('key');
$jtoken->setPayload([
'some' => 'value'
]);
$token = $jtoken->makeToken();
use Yakubenko\JTokens\JTokens;
$isTokenValid = JTokens::validateToken(
$yourToken,
$yourSecretKey
);