[logout] Clean sessions variables (actually logout) before sending SLO requests

Otherwise some backend may logout before we are actually logged out from the CAS
This commit is contained in:
Valentin Samir 2015-11-13 23:43:49 +01:00
parent 50781dba18
commit 0012a8f65d
1 changed files with 1 additions and 2 deletions

View File

@ -75,11 +75,10 @@ class LogoutMixin(object):
username=self.request.session.get("username"),
session_key=self.request.session.session_key
)
self.clean_session_variables()
user.logout(self.request)
user.delete()
except models.User.DoesNotExist:
pass
finally:
self.clean_session_variables()