1. Go to this page and download the library: Download controlabs/jwt-helper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
useControlabs\Helper\JWTasJWTHelper;
$helper = new JWTHelper(PRIVATE_KEY, PUBLIC_KEY);
// Use only for logs or specific purposes because it extracts content without validating the token.
$payload = $helper->payload($_POST['token']);
echo json_encode([
'user_id' => $payload['user_id'],
'group_id' => $payload['group_id']
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.