Skip to content

Commit

Permalink
spid backend acr selection
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Mar 13, 2024
1 parent 7be54a2 commit 278e1be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion example/backends/spidsaml2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 278e1be

Please sign in to comment.