From e1aa57855a37c401eb8de7d757518cc0835897dc Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Mon, 8 Jul 2013 15:27:14 -0700 Subject: [PATCH] Allowed unknown attribute handling --- src/saml2/response.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/saml2/response.py b/src/saml2/response.py index 1b19191..7310878 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -443,7 +443,7 @@ class AuthnResponse(StatusResponse): def __init__(self, sec_context, attribute_converters, entity_id, return_addr=None, outstanding_queries=None, timeslack=0, asynchop=True, allow_unsolicited=False, - test=False): + test=False, allow_unknown_attributes=False): StatusResponse.__init__(self, sec_context, return_addr, timeslack, asynchop=asynchop) @@ -460,6 +460,7 @@ class AuthnResponse(StatusResponse): self.session_not_on_or_after = 0 self.allow_unsolicited = allow_unsolicited self.test = test + self.allow_unknown_attributes = allow_unknown_attributes def loads(self, xmldata, decode=True, origxml=None): self._loads(xmldata, decode, origxml) @@ -584,7 +585,8 @@ class AuthnResponse(StatusResponse): logger.debug("Converts name format: %s" % (aconv.name_format,)) self.decrypt_attributes(_attr_statem) - ava = to_local(self.attribute_converters, _attr_statem) + ava = to_local(self.attribute_converters, _attr_statem, + self.allow_unknown_attributes) return ava def _bearer_confirmed(self, data):