Hello.

I'm implementing an OAuth provider using the python lib and have a few  
question regarding the OAuthDataStore.

The example in 
http://oauth.googlecode.com/svn/code/python/oauth/example/server.py 
  generates dummy values in the initialization and refers to them in  
the other methods but I don't know if this is because it's a dummy  
example or the best way to do it. The other sample I found was 
http://code.welldev.org/django-oauth/src/tip/oauth_provider/stores.py 
  . This one also stores values that will be used in subsequent method  
invocations: lookup_consumer stores self.consumer which will be used  
in fetch_request_token. Is this the correct way to do it? Can we  
assume a certain order in the method calls or do we have to work only  
with the parameters we get passed?

Also, this last example does some extra verifications, like:

     def fetch_request_token(self, oauth_consumer):
         if oauth_consumer.key == self.consumer.key:
...
     def fetch_access_token(self, oauth_consumer, oauth_token):
         if oauth_consumer.key == self.consumer.key \
         and oauth_token.key == self.request_token.key \
Do we have to do these checks or does the OAuth library take care of  
it? This other example 
http://code.google.com/p/python-gearshift/source/browse/trunk/gearshift/tools/oauth/sodatastore.py
 
  has no such checks.

Thanks for the help,
André Cruz
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to