mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 区别简易认证和复杂认证
This commit is contained in:
parent
315e2f8304
commit
962c6b306c
@ -79,14 +79,14 @@ class ApiAuth {
|
||||
* @author zhaoxiang <zhaoxiang051405@gmail.com>
|
||||
*/
|
||||
private function doEasyCheck($accessToken) {
|
||||
$appInfo = cache('AccessToken:' . $accessToken);
|
||||
$appInfo = cache('AccessToken:Easy:' . $accessToken);
|
||||
if (!$appInfo) {
|
||||
$appInfo = AdminApp::get(['app_secret' => $accessToken]);
|
||||
if (!$appInfo) {
|
||||
return false;
|
||||
} else {
|
||||
$appInfo = $appInfo->toArray();
|
||||
cache('AccessToken:' . $accessToken, $appInfo);
|
||||
cache('AccessToken:Easy:' . $accessToken, $appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user