Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe De Marco authored Mar 14, 2024
1 parent 278e1be commit b85a729
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions example/backends/spidsaml2.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,15 +564,18 @@ def authn_response(self, context, binding):
][0][0]

# ACR
issuer = authn_response.response.issuer
issuer = authn_response.response.issuer.text.strip()
acr_map :dict = {}

try:
acr_map = self.config["acr_mapping"]
except Exception as e:
logger.warning(
"acr_mapping not defined in the spid backend"
)
)
return self.handle_error(
**{"message": "acr_mapping not defined in the spid backend", "troubleshoot": "Please contact the administrators of the platform and tell them to configure properly the acr_mapping in the SPID/CIE 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 b85a729

Please sign in to comment.