modify
This commit is contained in:
+3
-11
@@ -136,14 +136,9 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY=
|
|||||||
} else if ($headers instanceof HttpHeaders) {
|
} else if ($headers instanceof HttpHeaders) {
|
||||||
$headers = $headers->getHeaders();
|
$headers = $headers->getHeaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data = $headers;
|
$this->data = $headers;
|
||||||
if (empty($unionId)) {
|
if (!isset($this->data['source'])) {
|
||||||
throw new AuthException('您还未登录或已登录超时');
|
$this->data['source'] = 'browser';
|
||||||
}
|
|
||||||
$source = $header['source'] ?? 'browser';
|
|
||||||
if (empty($source) || !in_array($source, $this->source)) {
|
|
||||||
throw new Exception('未知的登录设备');
|
|
||||||
}
|
}
|
||||||
return $this->createEncrypt($unionId);
|
return $this->createEncrypt($unionId);
|
||||||
}
|
}
|
||||||
@@ -177,7 +172,6 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY=
|
|||||||
foreach ($caches as $cache) {
|
foreach ($caches as $cache) {
|
||||||
$redis->del($cache);
|
$redis->del($cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $refresh;
|
return $refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,9 +273,7 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY=
|
|||||||
{
|
{
|
||||||
$source = $this->getSource();
|
$source = $this->getSource();
|
||||||
if (!empty($_source)) $source = $_source;
|
if (!empty($_source)) $source = $_source;
|
||||||
if (empty($source)) {
|
|
||||||
throw new AuthException("未知的登陆设备");
|
|
||||||
}
|
|
||||||
return 'Tmp_Token:' . strtoupper($source) . ':' . $token;
|
return 'Tmp_Token:' . strtoupper($source) . ':' . $token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user