From d5b8ec81a99509eb1053dadab7afad55c804284c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 29 May 2015 11:00:10 +0200 Subject: [PATCH] app_settings,views: make the default assertion consumer binding customizable, and restore POST as the default And restore default to POST. fixes #7406 --- mellon/app_settings.py | 1 + mellon/templates/mellon/metadata.xml | 5 +++++ mellon/utils.py | 1 + 3 files changed, 7 insertions(+) diff --git a/mellon/app_settings.py b/mellon/app_settings.py index 69d59eb..3dd5b57 100644 --- a/mellon/app_settings.py +++ b/mellon/app_settings.py @@ -25,6 +25,7 @@ class AppSettings(object): 'CREATE_GROUP': True, 'ERROR_URL': None, 'ERROR_REDIRECT_AFTER_TIMEOUT': 120, + 'DEFAULT_ASSERTION_CONSUMER_BINDING': 'post', # or artifact } @property diff --git a/mellon/templates/mellon/metadata.xml b/mellon/templates/mellon/metadata.xml index f936e81..ba68aa2 100644 --- a/mellon/templates/mellon/metadata.xml +++ b/mellon/templates/mellon/metadata.xml @@ -25,11 +25,16 @@ {% endfor %} diff --git a/mellon/utils.py b/mellon/utils.py index 231f4d1..3255423 100644 --- a/mellon/utils.py +++ b/mellon/utils.py @@ -32,6 +32,7 @@ def create_metadata(request): 'logout_url': request.build_absolute_uri(logout_url), 'public_keys': public_keys, 'name_id_formats': name_id_formats, + 'default_assertion_consumer_binding': app_settings.DEFAULT_ASSERTION_CONSUMER_BINDING, }) return METADATA[entity_id]