Comments (14)
新access_token不应该也按照配置文件的有效期生成吗?为什么这里要加上$tokenPayload['exp']
from webman-jwt.
没过期也可以刷新的,例如:学员需要考试,在考试之前需要强制刷新(访问令牌并没有过期)获取访问令牌,避免在考试过程中令牌失效
from webman-jwt.
我测试的结果是,假如access_token有效期是20秒,过期后,我通过refreshtoken刷新得到的新access_token有效期不是20秒,你可以测试下看看
from webman-jwt.
from webman-jwt.
不是20秒,而是 20 + 60 秒是吗?
from webman-jwt.
对
from webman-jwt.
那是因为配置项有
// 时钟偏差冗余时间,单位秒。建议这个余地应该不大于几分钟。
'leeway' => 60,
你把这个设置成 0,就可以了
from webman-jwt.
不是的,这个参数我测试的时候已经改为0了。
from webman-jwt.
#4 (comment) 你反馈的这个问题确实是存在的,在常驻内存框架下,令牌签发时间iat
并不是当前的时间戳,而是初始化的时间戳。之前一直是在fpm下使用,没有这个问题
from webman-jwt.
通过refresh_token刷新获得的新access_token,有效期貌似是access_exp + refresh_exp的总和,刚刚试了下access_token有效期设置为20秒,refresh_exp有效期为1小时,现在已经过去了接近十分钟,新的access_token一直有效
from webman-jwt.
嗯!就是令牌签发时间iat 这个问题
from webman-jwt.
等你搞好我再update😋
from webman-jwt.
v1.2.5 已经按照你的修复,感谢反馈
from webman-jwt.
ok,已更新
from webman-jwt.
Related Issues (15)
- 下载不了。。。难道我的composer已经废了吗 HOT 5
- 建议增加多应用 HOT 1
- token key使用ip HOT 3
- 一个项目中,前后台,两个表需要进行登录逻辑 HOT 1
- 单点登录设置client,无效 HOT 3
- Bearer验证中的凭证格式有误,中间必须有个空格 HOT 2
- Tinywan\Jwt\JwtToken::getUser() 方法返回值 HOT 3
- 获取方式建议 HOT 6
- 释放token文档里没有写相关内容 HOT 1
- refreshtoken过期的问题 HOT 11
- 怎么在webman中间件里判断登录过期 HOT 3
- 文档中令牌生成示例有错误,uid应改为id,否则提示错误 HOT 1
- RedisHandler::clearToken 方法第二个参数类型有误 HOT 2
- 建议增加一些新功能 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webman-jwt.