Browse Source

HUE-7431 [core] When idle session timeout is enabled it causes issues with IDP initiated SAML

(cherry picked from commit 786a564ccc07a6f3c81c9e20ba6cbc5e3efe415a)
(cherry picked from commit d97c69420fc423706154ee8ee5da0701a3f6b318)
Chris Conner 8 years ago
parent
commit
0729331d43
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/core/src/desktop/middleware.py

+ 1 - 1
desktop/core/src/desktop/middleware.py

@@ -322,7 +322,7 @@ class LoginAndPermissionMiddleware(object):
 
 
     logging.info("Redirecting to login page: %s", request.get_full_path())
     logging.info("Redirecting to login page: %s", request.get_full_path())
     access_log(request, 'login redirection', level=access_log_level)
     access_log(request, 'login redirection', level=access_log_level)
-    if request.ajax:
+    if request.ajax and not 'libsaml.backend.SAML2Backend' in desktop.conf.AUTH.BACKEND.get():
       # Send back a magic header which causes Hue.Request to interpose itself
       # Send back a magic header which causes Hue.Request to interpose itself
       # in the ajax request and make the user login before resubmitting the
       # in the ajax request and make the user login before resubmitting the
       # request.
       # request.