Skip to content

Commit e1aa578

Browse files
author
Roland Hedberg
committed
Allowed unknown attribute handling
1 parent 4cab835 commit e1aa578

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/saml2/response.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class AuthnResponse(StatusResponse):
443443
def __init__(self, sec_context, attribute_converters, entity_id,
444444
return_addr=None, outstanding_queries=None,
445445
timeslack=0, asynchop=True, allow_unsolicited=False,
446-
test=False):
446+
test=False, allow_unknown_attributes=False):
447447

448448
StatusResponse.__init__(self, sec_context, return_addr, timeslack,
449449
asynchop=asynchop)
@@ -460,6 +460,7 @@ def __init__(self, sec_context, attribute_converters, entity_id,
460460
self.session_not_on_or_after = 0
461461
self.allow_unsolicited = allow_unsolicited
462462
self.test = test
463+
self.allow_unknown_attributes = allow_unknown_attributes
463464

464465
def loads(self, xmldata, decode=True, origxml=None):
465466
self._loads(xmldata, decode, origxml)
@@ -584,7 +585,8 @@ def get_identity(self):
584585
logger.debug("Converts name format: %s" % (aconv.name_format,))
585586

586587
self.decrypt_attributes(_attr_statem)
587-
ava = to_local(self.attribute_converters, _attr_statem)
588+
ava = to_local(self.attribute_converters, _attr_statem,
589+
self.allow_unknown_attributes)
588590
return ava
589591

590592
def _bearer_confirmed(self, data):

0 commit comments

Comments
 (0)