-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(os/gsession): add session reset function. #3726
base: master
Are you sure you want to change the base?
Conversation
修改多语言替换和参数无关
修改多语言替换和参数无关
修改多语言替换和参数无关
修改多语言替换和参数无关
如果包含两个功能的修改,可以拆分为两个pr提交,这样不会相互影响,也能提高代码审批的效率。 |
If it contains modifications to two functions, it can be split into two PR submissions, so that they will not affect each other and improve the efficiency of code approval. |
修改多语言替换和参数无关 还原无关文件
修改多语言替换和参数无关 还原无关文件 处理测试不通过问题
Quality Gate passedIssues Measures |
|
|
i18n/gi18n/gi18n_manager.go
Outdated
return result | ||
} | ||
} | ||
return fmt.Sprintf(result, values...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lxy1151 请先拆分pr,一个pr只做一个事情。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,我先处理下
@lxy1151 Any updates? |
I have processed it, please recheck! |
@@ -155,6 +157,33 @@ func (s *Session) Remove(keys ...string) (err error) { | |||
return nil | |||
} | |||
|
|||
func (s *Session) RegenSession(delOld ...bool) (newSid string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请描述增加此方法的必要性,例如需要解决什么样的业务场景痛点?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有这个方法,sessionId始终不能过期。
每次登录时要求上次的sessionId过期,无法实现,特此加了该方法
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个怎么说,还需修改什么吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接使用RemoveAll
不就行了呢。
@@ -155,6 +157,33 @@ func (s *Session) Remove(keys ...string) (err error) { | |||
return nil | |||
} | |||
|
|||
func (s *Session) RegenSession(delOld ...bool) (newSid string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接使用RemoveAll
不就行了呢。
session模块:增加了session重置方法。
使用 场景:
重新登录后使原来的sessionId过期,新生成一个sessionId