On Wed, 2009-08-12 at 18:35 -0700, Leah Culver wrote:
> Sorry for not getting back to you sooner. The patch you sent was a bit
> overwhelming but had some pretty good stuff in it.
> 
> I've added preliminary 1.0a support here:
> http://code.google.com/p/oauth/source/detail?r=1092

This is broken. The change only adds the oauth_verifier argument to the
fetch_access_token method of OAuthDataStore. It also must be passed in
to the authorize_request_token method, so that the value can be stored,
and compared to in fetch_access_token, otherwise the argument is
useless, as there's nothing to compare it with. The attached patch
fixes this, and the example server.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---

Index: oauth.py
===================================================================
--- oauth.py	(revision 1092)
+++ oauth.py	(working copy)
@@ -573,7 +573,7 @@ class OAuthDataStore(object):
         """-> OAuthToken."""
         raise NotImplementedError
 
-    def authorize_request_token(self, oauth_token, user):
+    def authorize_request_token(self, oauth_token, user, oauth_verifier):
         """-> OAuthToken."""
         raise NotImplementedError
 
@@ -647,4 +647,4 @@ class OAuthSignatureMethod_PLAINTEXT(OAu
     def build_signature(self, oauth_request, consumer, token):
         key, raw = self.build_signature_base_string(oauth_request, consumer,
             token)
-        return key
\ No newline at end of file
+        return key
Index: example/server.py
===================================================================
--- example/server.py	(revision 1092)
+++ example/server.py	(working copy)
@@ -80,10 +80,11 @@ class MockOAuthDataStore(oauth.OAuthData
             return self.access_token
         return None
 
-    def authorize_request_token(self, oauth_token, user):
+    def authorize_request_token(self, oauth_token, user, oauth_verifier):
         if oauth_token.key == self.request_token.key:
             # authorize the request token in the store
             # for mock store, do nothing
+            self.verifier = oauth_verifier
             return self.request_token
         return None
 
@@ -192,4 +193,4 @@ def main():
         server.socket.close()
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()

Reply via email to