This commit is contained in:
eson
2023-08-28 14:21:06 +08:00
parent 2830ea8724
commit bde9e98f62
26 changed files with 43 additions and 35 deletions

View File

@@ -46,7 +46,7 @@ func (l *BackendUserLoginLogic) BackendUserLogin(req *types.RequestUserLogin) (r
}
// 如果密码匹配,则生成 JWT Token。
nowSec := time.Now().Unix()
nowSec := time.Now().UTC().Unix()
jwtToken, err = auth.GenerateBackendJwtToken(&l.svcCtx.Config.Auth.AccessSecret, l.svcCtx.Config.Auth.AccessExpire, nowSec, user.Id, 0)
// 如果生成 JWT Token 失败,则抛出错误并返回未认证的状态码。