misc: force another auth.logout() after coming back from the IdP (#11394)

This commit is contained in:
Frédéric Péters 2016-06-16 16:13:04 +02:00
parent 33dded157a
commit 80c748820a
1 changed files with 4 additions and 0 deletions

View File

@ -421,6 +421,10 @@ class LogoutView(ProfileMixin, LogMixin, View):
def sp_logout_response(self, request):
'''Launch a logout request to the identity provider'''
self.profile = logout = utils.create_logout(request)
# the user shouldn't be logged anymore at this point but it may happen
# that a concurrent SSO happened in the meantime, so we do another
# logout to make sure.
auth.logout(request)
try:
logout.processResponseMsg(request.META['QUERY_STRING'])
except lasso.LogoutPartialLogoutError: