feat : close sso

This commit is contained in:
2024-11-12 11:55:44 +08:00
parent 193b862977
commit 82dd7450af
2 changed files with 5 additions and 6 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Exception\Handler;
use App\Constants\ReturnCode;
use App\Exception\ErrException;
use App\Lib\AdminReturn;
use App\Lib\ApiReturn;

View File

@@ -42,11 +42,11 @@ class JwtAuthMiddleware implements MiddlewareInterface
}
//单点登录
if ($this->userCache->getAdminToken($userJwt['data']->id) != $authorization) {
return $this->response->json(
$this->apiReturn->error(AdminCode::getMessage(AdminCode::LOGIN_TOKEN_ERROR), AdminCode::LOGIN_TOKEN_ERROR)
);
}
// if ($this->userCache->getAdminToken($userJwt['data']->id) != $authorization) {
// return $this->response->json(
// $this->apiReturn->error(AdminCode::getMessage(AdminCode::LOGIN_TOKEN_ERROR), AdminCode::LOGIN_TOKEN_ERROR)
// );
// }
Context::set('admin_id',$userJwt['data']->id);
Context::set('role_id',$userJwt['data']->role);