[Python-modules-commits] [python-social-auth] 62/131: adds custom get_user_id to coursera backend

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:17:02 UTC 2016


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

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

commit c9d77ae0997052f3abdb63cc7f3353575e944fbc
Author: Sergey <sergey.kospanov at gmail.com>
Date:   Sun Jun 5 19:11:30 2016 +0300

    adds custom get_user_id to coursera backend
---
 social/backends/coursera.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/social/backends/coursera.py b/social/backends/coursera.py
index 9507edb..ed32721 100644
--- a/social/backends/coursera.py
+++ b/social/backends/coursera.py
@@ -28,6 +28,10 @@ class CourseraOAuth2(BaseOAuth2):
         """Return user details from Coursera account"""
         return {'username': self._get_username_from_response(response)}
 
+    def get_user_id(self, details, response):
+        """Return a username prepared in get_user_details as uid"""
+        return details.get(self.ID_KEY)
+
     def user_data(self, access_token, *args, **kwargs):
         """Load user data from the service"""
         return self.get_json(

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