diff --git a/src/Services/SessionAuthentication.php b/src/Services/SessionAuthentication.php index f39fc37..1f76e45 100644 --- a/src/Services/SessionAuthentication.php +++ b/src/Services/SessionAuthentication.php @@ -18,11 +18,10 @@ use Hyperf\HttpMessage\Cookie\Cookie; use Hyperf\HttpServer\Contract\RequestInterface; use Hyperf\Redis\Redis; use Hyperf\Server\Exception\InvalidArgumentException; -use Singularity\HDK\Account\Services\Auth\AuthenticationInterface; use Singularity\HDK\Auth\Resource\User; -use Singularity\HDK\Utils\Constants\CommonErrorCode; -use Singularity\HDK\Utils\Exceptions\Unauthorized; -use Singularity\HDK\Utils\Exceptions\ValidateException; +use Singularity\HDK\Core\Constants\CommonErrorCode; +use Singularity\HDK\Core\Exceptions\Unauthorized; +use Singularity\HDK\Core\Exceptions\ValidateException; class SessionAuthentication implements AuthenticationInterface { @@ -56,9 +55,9 @@ class SessionAuthentication implements AuthenticationInterface */ public function verified(?string $token = null): User { - if (!$this->session->isValidId($token ?? '')) { - throw new ValidateException(CommonErrorCode::AUTH_SESSION_ERROR, 'token', $token); - } + // if (!$this->session->isValidId($token ?? '')) { + // throw new ValidateException(CommonErrorCode::AUTH_SESSION_ERROR, 'token', $token); + // } $user = $this->session->get('userInfo'); if (empty($user)) {