diff --git a/example/backends/spidsaml2.py b/example/backends/spidsaml2.py index c5f06a42..47b3a30e 100644 --- a/example/backends/spidsaml2.py +++ b/example/backends/spidsaml2.py @@ -565,7 +565,14 @@ def authn_response(self, context, binding): # ACR issuer = authn_response.response.issuer - acr_map = self.config.get("acr_mapping", {}) + acr_map :dict = {} + + try: + acr_map = self.config["acr_mapping"] + except Exception as e: + logger.warning( + "acr_mapping not defined in the spid backend" + ) acr_default = acr_map.get("", "https://www.spid.gov.it/SpidL2") authn_context_classref = acr_map.get(issuer, acr_default)