This repository has been archived by the owner on May 21, 2022. It is now read-only.
Add support for leeway
#131
Comments
The RFC says
This suggests to me this is not meant to be a property of the token, but an option to the parser. I think we can solve this in the following way:
This would allow leeway to be supported with only very small compatibility changes. It would also allow for future extensions/options without breaking API compatibility. |
In the meantime, you an solve this problem for yourself using the following: type MyClaims struct {
*StandardClaims
Foo string
}
func (c * MyClaims) VerifyExpiresAt(cmp int64, req bool) bool {
var leeway = 120 // two minutes
return c.StandardClaims.VerifyExpiresAt(c.ExpiresAt, cmp - leeway, req)
} |
This was referenced Jun 16, 2016
This ticket replaced by #139 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It's been requested.
See #86
The text was updated successfully, but these errors were encountered: