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

Check if token expired in MiddlewareFunc #169

Merged
merged 10 commits into from
Sep 17, 2018
Merged

Conversation

a180285
Copy link
Contributor

@a180285 a180285 commented Sep 16, 2018

This pull request is based on
https://github.com/appleboy/gin-jwt/pull/137/commits

I just pick out the expiration check logic. Because I need this feature...

auth_jwt_test.go Outdated Show resolved Hide resolved
auth_jwt.go Outdated

return claims, nil
// isClaimsExpired check if Claims expire
func (mw *GinJWTMiddleware) isClaimsExpired(claims MapClaims) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func (*GinJWTMiddleware).isClaimsExpired is unused

auth_jwt.go Outdated Show resolved Hide resolved
auth_jwt.go Show resolved Hide resolved
@a180285
Copy link
Contributor Author

a180285 commented Sep 17, 2018

ping @appleboy

Copy link
Owner

@appleboy appleboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@appleboy appleboy merged commit a4d85f5 into appleboy:master Sep 17, 2018
@appleboy
Copy link
Owner

@a180285 Thanks.

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

Successfully merging this pull request may close these issues.

3 participants