OAuth2 Client That Works in App Engine

Can someone advise me in a good library or how to use a Python application based application using OAuth to authenticate to another server?

I have an appengine app that is awaiting user input. I would like the user to be able to upload an image that I would post on imgur.com and be able to show the user on my page. To be able to do this, I need to be able to authenticate api.imgur.com, hence the question.

+5
source share
3 answers

Take a look at the python-oauth2 project.

:

import oauth2 as oauth

# Create your consumer with the proper key/secret.
consumer = oauth.Consumer(key="your-twitter-consumer-key", 
    secret="your-twitter-consumer-secret")

# Request token URL for Twitter.
request_token_url = "http://twitter.com/oauth/request_token"

# Create our client.
client = oauth.Client(consumer)

# The OAuth Client request works just like httplib2 for the most part.
resp, content = client.request(request_token_url, "GET")
print resp
print content
+4

, simplegeo oauth2 GAE. GitHub , .

+1
0
source

All Articles