我有两行,一行是:https://stackoverflow.com/a/27288275/728750
It is possible , Facebook, Gmail have done that , But it is not simple.
Use a flag in the database that checks users on Session_Start that invalidates their session
If that flag is set. May not necessarily use a Boolean, you can use a DateTime value and
invalidate all sessions that started prior to that time. This could be done by checking a value stored in a cookie upon login.
What they trying to say is not clear.
How to implement this "you can use a DateTime value and invalidate all sessions that started prior to that time."?
如何知道用户会话何时开始?
我有另一个好的链接:https://stackoverflow.com/a/5492396/728750
authCookie.Expires < logoutTime.Value
上述行如何运作?假设我现在登录网站,今天日期是01/01/16,登录过期日期是07/01/16,我强制退出于02/01/16那么这个到期日期07/01/16将如何小于强制注销日期02/01/16。目前尚不清楚。任何人都可以帮我实现这个吗?感谢。