summaryrefslogtreecommitdiffstats
path: root/idp/extra/modules/saml2.py
diff options
context:
space:
mode:
Diffstat (limited to 'idp/extra/modules/saml2.py')
-rw-r--r--idp/extra/modules/saml2.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/idp/extra/modules/saml2.py b/idp/extra/modules/saml2.py
index 95b12f0..2b69363 100644
--- a/idp/extra/modules/saml2.py
+++ b/idp/extra/modules/saml2.py
@@ -75,7 +75,13 @@ class AlternateSaml2Directory(liberty.saml2.RootDirectory):
if not self.check_access_authorizations(login):
provider_id = login.remoteProviderId
provider_key = misc.get_provider_key(provider_id)
- label = misc.get_provider_and_label(provider_key)
+ try:
+ label = misc.get_provider_and_label(provider_key)[1]
+ except KeyError:
+ return template.error_page(_('''\
+You do not have required authorizations to access the service,
+you should contact the administration of your collectivity.'''))
+
return template.error_page(_('''\
You do not have required authorizations to access the "%s" service,
you should contact the administration of your collectivity.''') % label)