Removes confusing _uuid property

I think the original author had good intentions and didn't want to
duplicate code. Unfortunately I think this is more confusing since the
property returns a new value every time it is referenced.

Change-Id: I41db60f28cf15038a8430e238b9204d652e878b1
This commit is contained in:
David Stanek
2014-11-26 01:26:03 +00:00
parent 8c63c9ef8e
commit 1c106a56ad

View File

@@ -506,10 +506,6 @@ class ADFSUnscopedToken(_BaseSAMLPlugin):
]) ])
return options return options
@property
def _uuid4(self):
return str(uuid.uuid4())
def _cookies(self, session): def _cookies(self, session):
"""Check if cookie jar is not empty. """Check if cookie jar is not empty.
@@ -591,7 +587,7 @@ class ADFSUnscopedToken(_BaseSAMLPlugin):
messageID = etree.SubElement( messageID = etree.SubElement(
header, '{http://www.w3.org/2005/08/addressing}MessageID') header, '{http://www.w3.org/2005/08/addressing}MessageID')
messageID.text = 'urn:uuid:' + self._uuid4 messageID.text = 'urn:uuid:' + uuid.uuid4().hex
replyID = etree.SubElement( replyID = etree.SubElement(
header, '{http://www.w3.org/2005/08/addressing}ReplyTo') header, '{http://www.w3.org/2005/08/addressing}ReplyTo')
address = etree.SubElement( address = etree.SubElement(
@@ -632,7 +628,7 @@ class ADFSUnscopedToken(_BaseSAMLPlugin):
'wss-wssecurity-secext-1.0.xsd}UsernameToken') 'wss-wssecurity-secext-1.0.xsd}UsernameToken')
usernametoken.set( usernametoken.set(
('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-' ('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-'
'wssecurity-utility-1.0.xsd}u'), "uuid-%s-1" % self._uuid4) 'wssecurity-utility-1.0.xsd}u'), "uuid-%s-1" % uuid.uuid4().hex)
username = etree.SubElement( username = etree.SubElement(
usernametoken, ('{http://docs.oasis-open.org/wss/2004/01/oasis-' usernametoken, ('{http://docs.oasis-open.org/wss/2004/01/oasis-'