koding / kite

Micro-service framework in Go
https://godoc.org/github.com/koding/kite
MIT License
3.26k stars 300 forks source link

kite: always use UTC timezone for tokens #167

Closed rjeczalik closed 8 years ago

rjeczalik commented 8 years ago

Fixes:

2016-07-04 12:05:22 [klient] ERROR    Error in token. Token will not be renewed when it expires: Cannot parse token: Token used before issued

When klient and kontrol were in different timezones and their diff > leeway (by default always).

jwt-go 2.0 did use local time as does version 3.0, so renewing either did not worked at all or the tokens started to be validated right now - I have did not dig that deep.