mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-02-08 10:20:16 +08:00
fix : jwt
This commit is contained in:
@@ -21,11 +21,6 @@ use Hyperf\Di\Annotation\Inject;
|
||||
|
||||
class LoginService extends BaseAdminService
|
||||
{
|
||||
/**
|
||||
* @var string jwt场景
|
||||
*/
|
||||
private string $jwt = 'admin';
|
||||
|
||||
/**
|
||||
* @var AdminUserRepository
|
||||
*/
|
||||
@@ -54,7 +49,7 @@ class LoginService extends BaseAdminService
|
||||
|
||||
if ($adminInfo->status == AdminUserStatusCode::DISABLE) throw new ErrException('用户已禁用');
|
||||
|
||||
$jwtHandle = $this->tokenService->getJwt();
|
||||
$jwtHandle = $this->tokenService->setJwt('admin')->getJwt();
|
||||
|
||||
return $this->adminReturn->success('success',[
|
||||
'access_token' => $jwtHandle->builderAccessToken((string) $adminInfo->id)->toString(),
|
||||
|
||||
Reference in New Issue
Block a user