CHANGE_JWT_TIME_SET : AADHAVAN
This commit is contained in:
parent
ce1b0b8ae3
commit
a026f7799d
@ -24,9 +24,17 @@ class AuthJWT implements FilterInterface
|
|||||||
if (JWTToken::validateJWT($jwt)) {
|
if (JWTToken::validateJWT($jwt)) {
|
||||||
$data = JWTToken::validateJWT($jwt);
|
$data = JWTToken::validateJWT($jwt);
|
||||||
$data = json_decode($data);
|
$data = json_decode($data);
|
||||||
|
|
||||||
if ($data->status) {
|
if ($data->status) {
|
||||||
// $auth = $request->getHeader("Authorization");
|
// $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;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class JWTToken
|
|||||||
{
|
{
|
||||||
$secret_Key="secret";
|
$secret_Key="secret";
|
||||||
$iat = time();
|
$iat = time();
|
||||||
$exp = $iat + 120;
|
$exp = $iat + 9000;
|
||||||
$request_data = [
|
$request_data = [
|
||||||
"iat" => $iat,
|
"iat" => $iat,
|
||||||
"exp" => $exp,
|
"exp" => $exp,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user