This commit is contained in:
2023-12-21 22:01:33 +08:00
parent 439bb4afd1
commit 4d44f0206c
14 changed files with 506 additions and 20 deletions

View File

@ -6,6 +6,8 @@ use App\Const\RedisConst;
use App\Tools\Tools;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Redis;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class AuthService
{
@ -52,7 +54,7 @@ class AuthService
function getAllTokenInfoByUid($iUid)
{
$sTokenList = Redis::get(RedisConst::UID_TOKENS . $iUid);
if (empty($sToken)) return null;
if (empty($sTokenList)) return null;
return unserialize($sTokenList);
}
@ -140,6 +142,10 @@ class AuthService
});
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
function getCurrentUser()
{
if(app()->has('customerUser')){