File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 36
36
from django .views .decorators .csrf import csrf_exempt
37
37
38
38
from saml2 import BINDING_HTTP_REDIRECT , BINDING_HTTP_POST
39
+ from saml2 .client_base import LogoutError
39
40
from saml2 .metadata import entity_descriptor
40
41
from saml2 .ident import code , decode
41
42
from saml2 .sigver import MissingKey
@@ -376,7 +377,13 @@ def logout(request, config_loader_path=None):
376
377
'The session does not contain the subject id for user %s' ,
377
378
request .user )
378
379
379
- result = client .global_logout (subject_id )
380
+ try :
381
+ result = client .global_logout (subject_id )
382
+ except LogoutError as exp :
383
+ logger .exception ('Error Handled - SLO not supported by IDP: {}' .format (exp ))
384
+ auth .logout (request )
385
+ state .sync ()
386
+ return HttpResponseRedirect ('/' )
380
387
381
388
state .sync ()
382
389
You can’t perform that action at this time.
0 commit comments