Comments (1)
I get the reason.
Timeout: time.Minute * 60,
MaxRefresh: time.Minute * 60,
MaxRefresh: time.Minute * 60
should be large than Timeout: time.Minute * 60
.
// CheckIfTokenExpire check if token expire
func (mw *GfJWTMiddleware) CheckIfTokenExpire(ctx context.Context) (jwt.MapClaims, string, error) {
r := g.RequestFromCtx(ctx)
token, err := mw.parseToken(r)
if err != nil {
// If we receive an error, and the error is anything other than a single
// ValidationErrorExpired, we want to return the error.
// If the error is just ValidationErrorExpired, we want to continue, as we can still
// refresh the token if it's within the MaxRefresh time.
// (see https://github.com/appleboy/gin-jwt/issues/176)
from gf-jwt.
Related Issues (17)
- 返回请求header有问题
- SendCookie Expires time.Duration(maxage)*time.Millisecond
- 开启jwt后 原先正常的路由变404 HOT 1
- blacklist的存放问题 HOT 1
- 如何区分TOKEN失效可刷新····TOKEN失效不可刷新返回2个不同的状态 HOT 1
- 处理第三方包依赖 google.golang.org/appengine
- jwt v2 release
- 建议设置黑名单TOKEN可自定义KEY HOT 2
- 刷新Token可能获得与上次相同的Token
- LogoutHandler 好像存在一个bug
- 插件里的unauthorized方法的code状态码能不能不固定死? HOT 2
- 这一段代码是表示 user路径下的所有方法都需要鉴权吗? 请关闭吧,我自己测试了 HOT 1
- 调用哪个方法能把token解析出来 HOT 1
- 能否将Token过期和最大刷新时间过期的错误区分开
- 更改错误返回的消息提示 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 gf-jwt.