feat : close sso
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Exception\Handler;
|
||||
|
||||
use App\Constants\ReturnCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Lib\AdminReturn;
|
||||
use App\Lib\ApiReturn;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user