作者 yangfu

修改权限过期时间

... ... @@ -15,7 +15,7 @@ const (
DeviceType = 1
)
const TokenExpire = 3600
const TokenExpire = 60 * 15
const RefreshTokenExipre = 3600 * 24 * 30 * 3 //刷新token 三个月过期
const SmscodeDayLimitTime = 10 //短信验证码每天最多发10次
... ...
... ... @@ -569,6 +569,12 @@ func RefreshToken(request *protocol.RefreshTokenRequest) (rsp *protocol.RefreshT
err = protocol.NewErrWithMessage(4140, err)
return
}
//注入用户二次鉴权
if authMessage, hasAuth := agg.GetUserModuleAuth(userAuth.CurrentUserCompanyId); !hasAuth && userAuth.CurrentUserCompanyId > 0 {
log.Error(authMessage.Errno, authMessage.Errmsg)
err = protocol.NewCustomMessage(4141, authMessage.Errmsg) //账号不存在
return
}
//userAuth.AccessToken = uid.NewV1().StringNoDash()
userAuth.AccessToken = uid.NewV1().StringNoDash()
userAuth.RefreshToken = uid.NewV1().StringNoDash()
... ...