incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ket...@apache.org
Subject svn commit: r493319 - in /incubator/heraldry/libraries/python/openid/trunk/openid: consumer/consumer.py test/test_consumer.py
Date Sat, 06 Jan 2007 05:19:50 GMT
Author: keturn
Date: Fri Jan  5 21:19:49 2007
New Revision: 493319

URL: http://svn.apache.org/viewvc?view=rev&rev=493319
Log:
[python-to-heraldry @ consumer.consumer: rename openid.nonce to openid.response_nonce [#1564]]

Original author: Kevin Turner <kevin@janrain.com>
Date: 2006-12-16 00:10:02+00:00

Modified:
    incubator/heraldry/libraries/python/openid/trunk/openid/consumer/consumer.py
    incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/consumer/consumer.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/consumer/consumer.py?view=diff&rev=493319&r1=493318&r2=493319
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/consumer/consumer.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/consumer/consumer.py Fri Jan 
5 21:19:49 2007
@@ -1027,7 +1027,9 @@
 
         @returntype: str
         """
-        return self.getSigned(OPENID2_NS, 'nonce')
+        return self.getSigned(OPENID2_NS, 'response_nonce')
+
+
 
 class FailureResponse(Response):
     """A response with a status of FAILURE. Indicates that the OpenID

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py?view=diff&rev=493319&r1=493318&r2=493319
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py Fri Jan
 5 21:19:49 2007
@@ -429,8 +429,8 @@
              'openid.identity': 'something something',
              'openid.assoc_handle': 'does not matter',
              'openid.sig': GOODSIG,
-             'openid.nonce': mkNonce(),
-             'openid.signed': 'identity,return_to,nonce',
+             'openid.response_nonce': mkNonce(),
+             'openid.signed': 'identity,return_to,response_nonce',
              'openid.ns':OPENID2_NS,
              })
         self.endpoint = OpenIDServiceEndpoint()
@@ -455,19 +455,19 @@
 
     def test_idResNoIdentity(self):
         self.message.delArg(OPENID_NS, 'identity')
-        self.message.setArg(OPENID_NS, 'signed', 'return_to,nonce')
+        self.message.setArg(OPENID_NS, 'signed', 'return_to,response_nonce')
         r = self.consumer.complete(self.message, self.endpoint)
         self.failUnlessSuccess(r)
 
 
     def test_idResMissingIdentitySig(self):
-        self.message.setArg(OPENID_NS, 'signed', 'return_to,nonce')
+        self.message.setArg(OPENID_NS, 'signed', 'return_to,response_nonce')
         r = self.consumer.complete(self.message, self.endpoint)
         self.failUnlessEqual(r.status, FAILURE)
 
 
     def test_idResMissingReturnToSig(self):
-        self.message.setArg(OPENID_NS, 'signed', 'identity,nonce')
+        self.message.setArg(OPENID_NS, 'signed', 'identity,response_nonce')
         r = self.consumer.complete(self.message, self.endpoint)
         self.failUnlessEqual(r.status, FAILURE)
 
@@ -600,7 +600,7 @@
         """use server-generated nonce"""
         self.response = mkSuccess(self.endpoint,
                                   {'openid.ns':OPENID2_NS,
-                                   'openid.nonce': mkNonce(),})
+                                   'openid.response_nonce': mkNonce(),})
         ret = self.consumer._checkNonce(self.server_url, self.response)
         self.failUnlessEqual(ret.status, SUCCESS)
         self.failUnlessEqual(ret.identity_url, self.consumer_id)
@@ -612,7 +612,7 @@
         stamp, salt = splitNonce(nonce)
         self.store.useNonce(self.server_url, stamp, salt)
         self.response = mkSuccess(self.endpoint,
-                                  {'openid.nonce': nonce,
+                                  {'openid.response_nonce': nonce,
                                    'openid.ns':OPENID2_NS,
                                    })
         ret = self.consumer._checkNonce(self.server_url, self.response)
@@ -624,8 +624,9 @@
 
     def test_tamperedNonce(self):
         """Malformed nonce"""
-        self.response = mkSuccess(self.endpoint, {'openid.ns':OPENID2_NS,
-                                                  'openid.nonce':'malformed'})
+        self.response = mkSuccess(self.endpoint,
+                                  {'openid.ns':OPENID2_NS,
+                                   'openid.response_nonce':'malformed'})
         ret = self.consumer._checkNonce(self.server_url, self.response)
         self.failUnlessEqual(ret.status, FAILURE)
         self.failUnlessEqual(ret.identity_url, self.consumer_id)



Mime
View raw message