small fixes for return url after saml logout

This commit is contained in:
NomenNescio 2017-12-05 12:28:54 +01:00
parent 85c07210db
commit d5b2dedd7f

View File

@ -394,7 +394,7 @@ def logout():
auth = utils.init_saml_auth(req) auth = utils.init_saml_auth(req)
if app.config.get('SAML_LOGOUT_URL'): if app.config.get('SAML_LOGOUT_URL'):
return redirect(auth.logout(name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", 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'])) 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", return redirect(auth.logout(name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
session_index = session['samlSessionIndex'], session_index = session['samlSessionIndex'],
@ -413,6 +413,8 @@ def saml_logout():
clear_session() clear_session()
if url is not None: if url is not None:
return redirect(url) return redirect(url)
elif app.config.get('SAML_LOGOUT_URL'):
return redirect(app.config.get('SAML_LOGOUT_URL'))
else: else:
return redirect(url_for('index')) return redirect(url_for('index'))
else: else: