[Python-modules-commits] [python-social-auth] 11/71: Store all tokens on refresh

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:14:21 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 3c83f4406f4754e0a8eab3d773e305d2724608ce
Author: Maarten van Schaik <maarten at byte.nl>
Date:   Fri Oct 2 12:15:08 2015 +0200

    Store all tokens on refresh
---
 social/storage/base.py | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/social/storage/base.py b/social/storage/base.py
index 475b70c..1964bc1 100644
--- a/social/storage/base.py
+++ b/social/storage/base.py
@@ -52,14 +52,7 @@ class UserMixin(object):
         if token and backend and hasattr(backend, 'refresh_token'):
             backend = backend(strategy=strategy)
             response = backend.refresh_token(token, *args, **kwargs)
-            access_token = response.get('access_token')
-            refresh_token = response.get('refresh_token')
-
-            if access_token or refresh_token:
-                if access_token:
-                    self.extra_data['access_token'] = access_token
-                if refresh_token:
-                    self.extra_data['refresh_token'] = refresh_token
+            if self.set_extra_data(response):
                 self.save()
 
     def expiration_datetime(self):

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