added configurable logout redirect URL

This commit is contained in:
NomenNescio 2017-12-04 14:43:58 +01:00
parent 620b0b55e8
commit 47cf1aff4a
2 changed files with 6 additions and 1 deletions

View File

@ -387,7 +387,10 @@ def logout():
session.pop('google_token', None)
session.clear()
logout_user()
return redirect(url_for('login'))
if app.config.get('SAML_LOGOUT_REDIRECT'):
return redirect(app.config.get('SAML_LOGOUT_REDIRECT'))
else:
return redirect(url_for('login'))
@app.route('/dashboard', methods=['GET', 'POST'])

View File

@ -92,6 +92,8 @@ SAML_METADATA_CACHE_LIFETIME = 1
SAML_SP_ENTITY_ID = 'http://<SAML SP Entity ID>'
SAML_SP_CONTACT_NAME = '<contact name>'
SAML_SP_CONTACT_MAIL = '<contact mail>'
## uncomment to redirect to the given URL on logout
# SAML_LOGOUT_REDIRECT = 'https://<idp>/logout'
#Default Auth
BASIC_ENABLED = True