[Python-modules-commits] [python-social-auth] 02/322: Fix does not match the number of arguments (for vk and ok backend)

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:12:41 UTC 2016


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

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

commit bee9518d75f65f335170fdd0d5533e2b1163452b
Author: SilentSokolov <silentsokolov at gmail.com>
Date:   Sun Oct 12 10:23:03 2014 +0400

    Fix does not match the number of arguments (for vk and ok backend)
---
 docs/backends/vk.rst             | 2 +-
 social/backends/odnoklassniki.py | 2 +-
 social/backends/vk.py            | 6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/backends/vk.rst b/docs/backends/vk.rst
index ea9a2f3..2b5deb5 100644
--- a/docs/backends/vk.rst
+++ b/docs/backends/vk.rst
@@ -38,7 +38,7 @@ To support OAuth2 authentication for VK.com applications:
 
 - Fill ``Application ID`` and ``Application Secret`` settings::
 
-    SOCIAL_AUTH_VK_APP_ID = ''
+    SOCIAL_AUTH_VK_APP_KEY = ''
     SOCIAL_AUTH_VK_APP_SECRET = ''
 
 - Fill ``user_mode``::
diff --git a/social/backends/odnoklassniki.py b/social/backends/odnoklassniki.py
index f1422ee..f639b79 100644
--- a/social/backends/odnoklassniki.py
+++ b/social/backends/odnoklassniki.py
@@ -67,7 +67,7 @@ class OdnoklassnikiApp(BaseAuth):
             'last_name': last_name
         }
 
-    def auth_complete(self, request, user, *args, **kwargs):
+    def auth_complete(self, *args, **kwargs):
         self.verify_auth_sig()
         response = self.get_response()
         fields = ('uid', 'first_name', 'last_name', 'name') + \
diff --git a/social/backends/vk.py b/social/backends/vk.py
index f633f5f..e729268 100644
--- a/social/backends/vk.py
+++ b/social/backends/vk.py
@@ -85,6 +85,9 @@ class VKOAuth2(BaseOAuth2):
         ('expires_in', 'expires')
     ]
 
+    def get_user_id(self, details, response):
+        return response['uid']
+
     def get_user_details(self, response):
         """Return user details from VK.com account"""
         fullname, first_name, last_name = self.get_user_names(
@@ -97,7 +100,7 @@ class VKOAuth2(BaseOAuth2):
                 'first_name': first_name,
                 'last_name': last_name}
 
-    def user_data(self, access_token, response, *args, **kwargs):
+    def user_data(self, access_token, *args, **kwargs):
         """Loads user data from service"""
         request_data = ['first_name', 'last_name', 'screen_name', 'nickname',
                         'photo'] + self.setting('EXTRA_DATA', [])
@@ -106,7 +109,6 @@ class VKOAuth2(BaseOAuth2):
         data = vk_api(self, 'users.get', {
             'access_token': access_token,
             'fields': fields,
-            'uids': response.get('user_id')
         })
 
         if data.get('error'):

-- 
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