|
@@ -533,13 +533,13 @@ func (this *UserLoginController) Login() {
|
|
|
noTrustLoginId, _ := utils.Rc.RedisString(noTrustLoginKey)
|
|
|
if noTrustLoginId != `` { // 如果存在不可信设备,那么将其下架
|
|
|
oldNoTrustLoginKey := fmt.Sprint(utils.CACHE_ACCESS_TOKEN_LOGIN, noTrustLoginId)
|
|
|
- _ = utils.Rc.Put(oldNoTrustLoginKey, "0", 30*time.Minute)
|
|
|
+ _ = utils.Rc.Put(oldNoTrustLoginKey, "0", utils.LoginCacheTime*time.Minute)
|
|
|
}
|
|
|
|
|
|
// 如果当前是不可信设备,那么将其加入到不可信名单
|
|
|
loginKey := fmt.Sprint(utils.CACHE_ACCESS_TOKEN_LOGIN, sysSession.Id)
|
|
|
- _ = utils.Rc.Put(loginKey, "1", 30*time.Minute)
|
|
|
- _ = utils.Rc.Put(noTrustLoginKey, sysSession.Id, 30*time.Minute)
|
|
|
+ _ = utils.Rc.Put(loginKey, "1", utils.LoginCacheTime*time.Minute)
|
|
|
+ _ = utils.Rc.Put(noTrustLoginKey, sysSession.Id, utils.LoginCacheTime*time.Minute)
|
|
|
}
|
|
|
|
|
|
// 新增登录记录
|