[Python-modules-commits] [python-social-auth] 39/71: Update odnoklassniki.py

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:14:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.14
in repository python-social-auth.

commit b96be11c37cf26bc52d11011f5c742e1c39f87ab
Author: Sergey Trofimov <truetug at gmail.com>
Date:   Wed Oct 7 19:10:21 2015 +0300

    Update odnoklassniki.py
    
    Fix scope separator which is ";" in OK api
    Fix logic of get_user_details, it will correctly process email in OK response (because OK may return email in response in case you have permissions for that and scope "GET_EMAIL")
---
 social/backends/odnoklassniki.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/social/backends/odnoklassniki.py b/social/backends/odnoklassniki.py
index 89cec2d..1a7cf26 100644
--- a/social/backends/odnoklassniki.py
+++ b/social/backends/odnoklassniki.py
@@ -15,6 +15,7 @@ class OdnoklassnikiOAuth2(BaseOAuth2):
     name = 'odnoklassniki-oauth2'
     ID_KEY = 'uid'
     ACCESS_TOKEN_METHOD = 'POST'
+    SCOPE_SEPARATOR = ';'
     AUTHORIZATION_URL = 'http://www.odnoklassniki.ru/oauth/authorize'
     ACCESS_TOKEN_URL = 'http://api.odnoklassniki.ru/oauth/token.do'
     EXTRA_DATA = [('refresh_token', 'refresh_token'),
@@ -29,7 +30,7 @@ class OdnoklassnikiOAuth2(BaseOAuth2):
         )
         return {
             'username': response['uid'],
-            'email': '',
+            'email': response.get('email', ''),
             'fullname': fullname,
             'first_name': first_name,
             'last_name': last_name

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git



More information about the Python-modules-commits mailing list