[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

View File

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