3

I have a superadmin user in my system, and this user should be able to close all open session or select from users who are logged, which session to log out. There is a way of doing this without adding a new column to the AspNetUsers??

Luis Lopez
  • 561
  • 1
  • 10
  • 29

1 Answers1

3

If you are using OWIN authentication middleware, you can update security stamp for users to log them out. Here is documentation: https://msdn.microsoft.com/en-us/library/dn497579%28v=vs.108%29.aspx. But users won't be logged out immediately, because security stamp is checked at specific period of time. This interval is controlled by validateInterval parameter in authentication configuration (probably in Startup.cs). If you set validateInterval to zero, security stamp is checked on every request.

ranquild
  • 1,799
  • 1
  • 16
  • 25
  • I think you can update security stamp for all users without a problem. Users that are not logged in will be unaffected by this. – ranquild Apr 30 '15 at 15:28