From 1c106a56ad40631c948bb866132c4a9587b1eecc Mon Sep 17 00:00:00 2001 From: David Stanek Date: Wed, 26 Nov 2014 01:26:03 +0000 Subject: [PATCH] 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 --- keystoneclient/contrib/auth/v3/saml2.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/keystoneclient/contrib/auth/v3/saml2.py b/keystoneclient/contrib/auth/v3/saml2.py index 304fd41f6..cecde0289 100644 --- a/keystoneclient/contrib/auth/v3/saml2.py +++ b/keystoneclient/contrib/auth/v3/saml2.py @@ -506,10 +506,6 @@ class ADFSUnscopedToken(_BaseSAMLPlugin): ]) return options - @property - def _uuid4(self): - return str(uuid.uuid4()) - def _cookies(self, session): """Check if cookie jar is not empty. @@ -591,7 +587,7 @@ class ADFSUnscopedToken(_BaseSAMLPlugin): messageID = etree.SubElement( 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( header, '{http://www.w3.org/2005/08/addressing}ReplyTo') address = etree.SubElement( @@ -632,7 +628,7 @@ class ADFSUnscopedToken(_BaseSAMLPlugin): 'wss-wssecurity-secext-1.0.xsd}UsernameToken') usernametoken.set( ('{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( usernametoken, ('{http://docs.oasis-open.org/wss/2004/01/oasis-'