JTokens - A Very basic implementation of JWT for php
composer require yakubenko/jtokens
<?php
use Yakubenko\JTokens\JTokens;
$jtoken = new JTokens();
$jtoken->setSecretKey('key');
$jtoken->setPayload([
'some' => 'value'
]);
$token = $jtoken->makeToken();
<?php
use Yakubenko\JTokens\JTokens;
$isTokenValid = JTokens::validateToken(
$yourToken,
$yourSecretKey
);