Skip to content

Commit 547a25d

Browse files
author
Nick Barrett
committed
Handle nested NameID children inside attributes.
1 parent 4a30dc5 commit 547a25d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/onelogin/saml2/response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,15 @@ def get_attributes(self):
531531
if attr_text:
532532
values.append(attr_text)
533533

534+
# Parse any nested NameID children
535+
for nameid in attr.iterchildren('{%s}NameID' % OneLogin_Saml2_Constants.NSMAP['saml']):
536+
values.append({
537+
'NameID': {
538+
'Format': nameid.get('Format'),
539+
'NameQualifier': nameid.get('NameQualifier'),
540+
'value': nameid.text
541+
}
542+
})
534543
attributes[attr_name] = values
535544
return attributes
536545

0 commit comments

Comments
 (0)