mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 完善登出中间件
This commit is contained in:
parent
7ecc2c4b06
commit
8677d13bb5
@ -20,7 +20,9 @@ class AdminAuth {
|
||||
$ApiAuth = $request->header('Api-Auth', '');
|
||||
if ($ApiAuth) {
|
||||
$userInfo = cache('Login:' . $ApiAuth);
|
||||
if ($userInfo) {
|
||||
$userInfo = json_decode($userInfo, true);
|
||||
}
|
||||
if (!$userInfo || !isset($userInfo['id'])) {
|
||||
return json([
|
||||
'code' => ReturnCode::AUTH_ERROR,
|
||||
|
Loading…
x
Reference in New Issue
Block a user