From d5b2dedd7f050496962d2234211da9617ebd5e69 Mon Sep 17 00:00:00 2001 From: NomenNescio Date: Tue, 5 Dec 2017 12:28:54 +0100 Subject: [PATCH] small fixes for return url after saml logout --- app/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views.py b/app/views.py index 0be3298..254bf74 100644 --- a/app/views.py +++ b/app/views.py @@ -394,7 +394,7 @@ def logout(): auth = utils.init_saml_auth(req) if app.config.get('SAML_LOGOUT_URL'): return redirect(auth.logout(name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - redirect_url = app.config.get('SAML_LOGOUT_URL'), + return_to = app.config.get('SAML_LOGOUT_URL'), session_index = session['samlSessionIndex'], name_id=session['samlNameId'])) return redirect(auth.logout(name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", session_index = session['samlSessionIndex'], @@ -413,6 +413,8 @@ def saml_logout(): clear_session() if url is not None: return redirect(url) + elif app.config.get('SAML_LOGOUT_URL'): + return redirect(app.config.get('SAML_LOGOUT_URL')) else: return redirect(url_for('index')) else: