Add LinkedInMixin - Send oauth_version 1.0 instead of 1.0a #236

wants to merge 1 commit into


None yet
6 participants

Add LinkedInMixin to auth module. If OAUTH_VERSION is 1.0a, send 1.0 per spec. Small cleanups to pass pyflakes.

Any chance this is going to make it in?

Been about 6months with no feedback, wanted to use the main instead of the fork, and I'm going to use this functionality.


jparise commented May 25, 2012

I just gave this a spin, and it's working fine for me.

This new code does perpetuate some obsolete patterns (i.e. async_callback), but that's true of the tornado.auth code in general.

@jparise jparise commented on the diff Jun 1, 2012

@@ -270,7 +269,7 @@ def _oauth_request_token_url(self, callback_uri= None, extra_params=None):
- oauth_version=getattr(self, "_OAUTH_VERSION", "1.0a"),
+ oauth_version=self._oauth_version_to_send()

jparise Jun 1, 2012


Shouldn't this always be "1.0"? The rest of the tornado.auth code is pretty much hardwired to handle either version 1.0 or 1.0a, and if we always need to send 1.0 in the 1.0a case, all cases are covered.

This also makes the _oauth_version_to_send() method unnecessary.

fx86 commented Feb 9, 2013

Is LinkedinMixIn going to make it in, anytime soon ?


bdarnell commented Feb 9, 2013

No, I don't intend to add any more one-off auth classes to Tornado. Anyone who's interested can maintain one or more of these kinds of classes as a separate package (e.g. my own DropboxMixin at I've left this pull request for the _oauth_version_to_send part, but I've never gotten around to researching the right thing to do here.

bdarnell closed this in 6e00a75 Apr 14, 2013


ysimonson commented Jun 25, 2013

FYI for the sake of posterity, this class breaks from changes somewhere between tornado 3.0.1 and 3.1. We were using this code until the upgrade to 3.1, but now get this error:

TypeError: _on_request_token() takes exactly 5 arguments (4 given)

Now that LinkedIn supports OAuth2 (not the case when this patch was submitted 2 years ago), people should probably build off OAuth2Mixin anyway.


ysimonson commented Jun 27, 2013

Also, I made a LinkedIn OAuth2 implementation, based on a combination of this implementation and the Facebook graph mixin:

We don't use it in production due to historic reasons, so it's largely untested.

bdarnell referenced this pull request Oct 1, 2014


OAuth2 #1212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment