Commit 6c5d016f authored by hangjun83's avatar hangjun83

openapi 1.1

parent bf13b8e3
...@@ -77,6 +77,10 @@ class Authenticate ...@@ -77,6 +77,10 @@ class Authenticate
} }
} }
else{ else{
if($decodeToken['expire'] < time())
{
return Response::fail('身份验证失效,请重新登录',500,'');
}
$customerService = app(CustomerService::class); $customerService = app(CustomerService::class);
try{ try{
$customer = $customerService->getCustomerInfoByToken($decodeToken['hash']); $customer = $customerService->getCustomerInfoByToken($decodeToken['hash']);
......
...@@ -51,10 +51,10 @@ trait Helpers ...@@ -51,10 +51,10 @@ trait Helpers
} }
$dataJson = base64_decode($dataStr); $dataJson = base64_decode($dataStr);
$data = json_decode($dataJson, 1); $data = json_decode($dataJson, 1);
if($data['expire'] < time()) /*if($data['expire'] < time())
{ {
throw new UnauthorizedHttpException("token expired","身份验证失效,请重新登录"); throw new UnauthorizedHttpException("token expired","身份验证失效,请重新登录");
} }*/
return $data; return $data;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment