News for hackers. Stuff that matters.
Re:JSON Web Tokens vs. Sessions by Alex3917 on Saturday June 18, 2016 @04:06PM (#11930367)
> storing the "real" expiration in cache so that it can be extended (or revoked) as needed.

You can also have a password_last_changed field on your user model, where any token issued before this date is considered invalid. That was if a user's account somehow gets compromised, all they need to do is change their password and then all of their existing sessions are expired automatically.

I can't think of any good reason for storing the expiration dates of each individual token, although maybe there is a use case somewhere.

Re:JSON Web Tokens vs. Sessions by jcoffland on Saturday June 18, 2016 @05:05PM (#11930586)
Your missing the whole point. If the server was to track password_last_changed it might as well just track user_currently_loggedin.
Re:JSON Web Tokens vs. Sessions by yxhuvud on Sunday June 19, 2016 @02:39AM (#11932048)
No, there is a huge difference in write load between those two options.
Re:JSON Web Tokens vs. Sessions by jcoffland on Sunday June 19, 2016 @08:15PM (#11935413)
But it's not RESTful which was the entire purpose of JWT.