CHANGE_JWT_TIME_SET : AADHAVAN

This commit is contained in:
aadhavan valli 2024-05-31 16:36:34 +05:30
parent ce1b0b8ae3
commit a026f7799d
2 changed files with 10 additions and 2 deletions

View File

@ -24,9 +24,17 @@ class AuthJWT implements FilterInterface
if (JWTToken::validateJWT($jwt)) {
$data = JWTToken::validateJWT($jwt);
$data = json_decode($data);
if ($data->status) {
// $auth = $request->getHeader("Authorization");
// $decodedToken = $data->decoded;
// $decodedToken->exp += 30;
// $newJwt = JWTToken::encode((array)$decodedToken);
// Set the new JWT in the response headers
// $response = service('response');
// $response->setHeader('Authorization', $newJwt);
return true;
}else{
header('Content-Type: application/json');

View File

@ -20,7 +20,7 @@ class JWTToken
{
$secret_Key="secret";
$iat = time();
$exp = $iat + 120;
$exp = $iat + 9000;
$request_data = [
"iat" => $iat,
"exp" => $exp,