Invalidate all session tokens when a user signs out

Fixes https://jira.coreos.com/browse/QS-85
This commit is contained in:
Joseph Schorr 2017-12-07 11:39:27 -05:00
parent d405f6f158
commit 1d1c6f0606
4 changed files with 16 additions and 4 deletions

View file

@ -725,6 +725,7 @@ class Signout(ApiResource):
@nickname('logout')
def post(self):
""" Request that the current user be signed out. """
model.user.invalidate_all_sessions(get_authenticated_user())
logout_user()
identity_changed.send(app, identity=AnonymousIdentity())
return {'success': True}