Skip to content

Commit 4d31c9c

Browse files
committed
Add a namespace for AttributeValue xsi:type value
This fixes the issue when integrating with onelogin's python3-saml client: Element '{urn:oasis:names:tc:SAML:2.0:assertion}AttributeValue', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'xs:string' has no corresponding namespace declaration in scope.
1 parent 05d9276 commit 4d31c9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/saml2/saml.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ def set_type(self, typ):
166166

167167
try:
168168
self.extension_attributes[XSI_TYPE] = typ
169+
self.extension_attributes['xmlns:xs'] = XS_NAMESPACE
169170
except AttributeError:
171+
self._extatt['xmlns:xs'] = XS_NAMESPACE
170172
self._extatt[XSI_TYPE] = typ
171173

172174
def get_type(self):

0 commit comments

Comments
 (0)