4 ms·
This is a practical implementation of something I described on stackoverflow in 2013. http://stackoverflow.com/questions/319530/restful-authentication/19369619
by jcoffland 10y ago
This is a practical implementation of something I described on stackoverflow in 2013. http://stackoverflow.com/questions/319530/restful-authentication/19369619#19369619 http://stackoverflow.com/questions/319530/restful-authentica...
The discussion there is rather interesting. The problem of invalidating logins is discussed. I have not found any satisfactory solution to this problem. You can set a timeout on tokens but then the user would have to log back in periodically. If the software can renew the token automatically then there is nothing to stop an attacker with a stolen token from doing the same, indefinitely. Still, in many situations these problems are no worse than compromised session based logins.
- niftich 10y agoSerious question: are there any opinionated frameworks that use JWT for session-like or session-replacing ways? There was one was linked in this thread [1], but how did framework authors tackle this domain? Is everything discussed here entirely homegrown, ad-hoc? Is this something that every one of us has to read up on and re-implement every time? [1] https://github.com/hharnisc/auth-service https://github.com/hharnisc/auth-service