News for hackers. Stuff that matters.
Re:Don't use JSON web tokens for sessions by monknomo on Monday June 13, 2016 @04:46PM (#11897476)
I thought you could include a tamper-proof expiration time in the payload of a JWT token? It also seems like data-staleness could be addressed, perhaps by including a hash of relevant data and invalidating/reissuing a token when the hash changes?
Re:Don't use JSON web tokens for sessions by pfooti on Monday June 13, 2016 @05:30PM (#11897845)
You can include a tamper-proof expiration time in JWT, but you cannot early-expire or extend that JWT easily (you could always pass back a new, extended one transparently).

But in my system, I just keep expiring the redis key for 25 hours from now each time I touch it, so users' authentications expire after 25 hours (after which point they have to go back through username/password or OAUTH, etc). You can easily change 25 hours to 4 days or a month or whatever.