1. Go to this page and download the library: Download quangdung93/jwt-redis 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/ */
//Limit the number of tokens stored in redis
'limit_token' => 5,
//The keys in the payload are used to hash session_id
'key_payload_hash' => [
'imei',
'user_id'
],
// Except route affected by middleware
'route_except' => [
'api/login'
]
// use Ajax\JwtRedis\Facades\JwtRedis;
$imei = '123';
$user_id = '1';
$params = [$imei, $user_id];
//$params is array s
JwtRedis::check($token, $params)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.