Giter Site home page Giter Site logo

appengine-oauth-library's People

Contributors

fukubaya avatar iangilman avatar mikeknapp avatar n0bisuke avatar setomits avatar silentgob avatar yeonwoonj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appengine-oauth-library's Issues

no encoding of key used for HMAC-SHA1 signing

I believe that this line:

key = "%s&%s" % (self.consumer_secret, secret) # Note compulsory "&".

should read:

key = urlencode({self.consumer_secret : secret}).replace("=", "&")

I'm basing this on this part of the specification:
http://oauth.net/core/1.0/#anchor16

However, I don't know how this would affect existing interoperability with Twitter, MySpace, etc. But I do know it fixes interoperability issues with a server-side java library, http://spring-security-oauth.codehaus.org/, which does encode these values when constructing the key.

Perhaps it should be an option.

Lib still usable?

Getting {"errors":[{"message":"Invalid or expired token","code":89}]} on every endpoint I've tried with fresh access tokens. Here's the auth view:

class GetTwitterTokenView(webapp.RequestHandler):

    def get(self):

        client = TwitterClient(
            TWITTER_CONSUMER_KEY,
            TWITTER_CONSUMER_SECRET,
            self.request.url
        )

        auth_token = self.request.get('oauth_token')
        auth_verifier = self.request.get('oauth_verifier')

        if auth_token and auth_verifier:

            tokens = AuthToken\
                .gql('ORDER BY created DESC LIMIT 1')[0]

            result = client.make_request(
                url='https://api.twitter.com/1.1/statuses/user_timeline.json',
                token=tokens.token, 
                secret=tokens.secret
            )
            return self.response.out.write(result.content)

        self.redirect(client.get_authorization_url())

Tilde Character in Twitter Status Update Causes "Incorrect Signature" Error

If a twitter status update contains a tilde character then the status update will fail with an "incorrect signature" error.

This issue can be resolved by modifying the encode function as follows. Note that the encode function is nested in OAuthClient's prepare_request function (located in oauth.py).

Change

def encode(text):
  return urlquote(str(text), "")

to

def encode(text):
  return urlquote(str(text), "~")

Authorization header : comma separated, POST : content-type

Hi,
I think, there is an issue with the consumer request parameters and particularly the Authorization header. http://oauth.net/core/1.0/#consumer_req_param

Authorization Header : Parameters are separated by a comma character.
Example : Authorization: OAuth realm="http://sp.example.com/",oauth_consumer_key="0685bd9184jfhq22",oauth_token="ad180jjd733klru7",.......

If sent with an HTTP POST the content-type should be application/x-www-form-urlencoded

Regards

Sylvain

Setting Content-Type

Hi,

This is a great library and I've got it working perfectly for use with Twitter. I've created a Google Latitude client with it, however one requirement when updating a users location is so have a Content-Type of application/json when POSTing.

As an initial stab I tried to add to the headers in make_async_request however that seems to throw off the authorisation and I get back a 401 response. Any idea on how to get this library to support setting this?

Thanks,
Alistair

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.