Skip to content
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

关于token无感刷新 #1

Open
xxwangkaimin opened this issue Aug 25, 2023 · 0 comments
Open

关于token无感刷新 #1

xxwangkaimin opened this issue Aug 25, 2023 · 0 comments

Comments

@xxwangkaimin
Copy link

你好,稍微看了一下你的项目,关于token的刷新机制我觉得可以参考一下若依等相关的一些项目。
在若依里面jwt过期时间长一点,比如设置为一天,然后用户信息是存在Redis里面的,有效期为一小时。当用户请求需要认证接口的时候,通过消息头认证信息获取Redis里面用户信息,如果没有获取到说明登录信息过期,如果有,判断Redis里面用户信息的过期时间是否小于20分钟,如果小于20分钟,就延长Redis用户信息一小时,否则不处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant