marcospereirampj / python-keycloak

MIT License
692 stars 296 forks source link

Make leeway configurable #567

Closed claeyswo closed 2 months ago

claeyswo commented 2 months ago

See https://github.com/latchset/jwcrypto/issues/358#issuecomment-2145416377

Since switching from python-jose to jwcrypto we can no longer configure the leeway.

Should be possible by changing this to this:

key = kwargs.pop("key)
full_jwt = jwt.JWT(jwt=token, **kwargs)
full_jwt.leeway = custom_leeway
full_jwt.validate(key)
return jwt.json_decode(full_jwt.claims)