This commit is contained in:
2020-09-08 14:52:13 +08:00
parent 227c410fe2
commit ac9c5df2b9
+3
View File
@@ -382,12 +382,15 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY=
$this->data = request()->headers->getHeaders(); $this->data = request()->headers->getHeaders();
$model = $this->getUserModel(); $model = $this->getUserModel();
if (empty($model)) { if (empty($model)) {
return '授权信息已过期!';
throw new AuthException('授权信息已过期!'); throw new AuthException('授权信息已过期!');
} }
if (!isset($model['user'])) { if (!isset($model['user'])) {
return '授权信息错误!';
throw new AuthException('授权信息错误!'); throw new AuthException('授权信息错误!');
} }
if (!$this->check($this->data, $model['user'])) { if (!$this->check($this->data, $model['user'])) {
return '授权信息不合法!';
throw new AuthException('授权信息不合法!'); throw new AuthException('授权信息不合法!');
} }
$this->expireRefresh(); $this->expireRefresh();