Skip to content

Commit

Permalink
Merge 00ec174 into 0409cc4
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Jossermoz committed Jun 22, 2015
2 parents 0409cc4 + 00ec174 commit ad011b6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.rst
Expand Up @@ -155,6 +155,11 @@ All contributions and comments are welcome.
Change Log
==========

v0.0.2
------
* Cast default provider name to unicode
* Fix resource request extra params not used

v0.0.1
------
* Initial
2 changes: 1 addition & 1 deletion uniauth/__init__.py
Expand Up @@ -3,4 +3,4 @@

from .consumers import *

__version__ = '0.0.1'
__version__ = '0.0.2'
4 changes: 2 additions & 2 deletions uniauth/base.py
Expand Up @@ -29,9 +29,9 @@ class MetaAuthConsumer(type):

def __new__(cls, name, bases, attrs):
if 'name' not in attrs:
attrs['name'] = name.lower()
attrs['name'] = six.text_type(name.lower())
if 'verbose_name' not in attrs:
attrs['verbose_name'] = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', name)
attrs['verbose_name'] = six.text_type(re.sub('(.)([A-Z][a-z]+)', r'\1 \2', name))
return super(MetaAuthConsumer, cls).__new__(cls, name, bases, attrs)


Expand Down
4 changes: 2 additions & 2 deletions uniauth/consumers.py
Expand Up @@ -18,7 +18,7 @@ class Google(ProfileMixin, OAuth2Consumer):
profile_url = "https://www.googleapis.com/oauth2/v1/userinfo"

authorization_params = {"approval_prompt": "auto"}
request_resource_params = {"alt": "json"}
request_extra_params = {"alt": "json"}

def normalize_profile_data(self, data):
return {"uid": data.get("id"),
Expand Down Expand Up @@ -74,7 +74,7 @@ class LinkedIn(ProfileMixin, OAuth2Consumer):
access_token_url = "https://api.linkedin.com/uas/oauth2/accessToken"
profile_url = "https://api.linkedin.com/v1/people/~:(id,first-name,last-name,picture-url,email-address)"

request_resource_params = {"format": "json"}
request_extra_params = {"format": "json"}

def normalize_profile_data(self, data):
return {"uid": data.get("id"),
Expand Down
2 changes: 1 addition & 1 deletion uniauth/oauth2.py
Expand Up @@ -85,7 +85,7 @@ def normalize_token_data(self, token):
"""
token = copy(token)
print(token)

if token.get("expires_at", False):
token["expires_at"] = datetime.fromtimestamp(token.get("expires_at"), tz=utc)

Expand Down

0 comments on commit ad011b6

Please sign in to comment.