Skip to content

Commit

Permalink
Merge pull request #750 from adambratt/master
Browse files Browse the repository at this point in the history
LinkedIn OAuth1 Fix
  • Loading branch information
omab committed Aug 23, 2013
2 parents 9a79d9f + 12d56ca commit 5a6b801
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion social_auth/backends/contrib/linkedin.py
Expand Up @@ -56,8 +56,17 @@ def get_user_details(self, response):
'last_name': last_name,
'email': email}

@classmethod
def tokens(cls, instance):
""" Return list of OAuth v1 tokens from Linkedin """
token = super(LinkedinBackend, cls).tokens(instance)
if token and 'access_token' in token:
token = dict(tok.split('=')
for tok in token['access_token'].split('&'))
return token

class LinkedinOAuth2Backend(LinkedinBackend):

class LinkedinOAuth2Backend(OAuthBackend):
"""Linkedin OAuth2 authentication backend"""
name = 'linkedin-oauth2'

Expand Down

0 comments on commit 5a6b801

Please sign in to comment.