[Python-modules-commits] [python-social-auth] 204/322: Add revoke token ability to strava
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:13:09 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 bcac402f7f2bf665fbd1550120b344a7bfd1114d
Author: Buddy Lindsey, Jr. <buddylindsey at users.noreply.github.com>
Date: Sun Mar 29 14:24:14 2015 -0500
Add revoke token ability to strava
Currently you can't disconnect strava from the site. This sets the deauthorize url and sets approriate data for revoking token on strava site.
---
social/backends/strava.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/social/backends/strava.py b/social/backends/strava.py
index b0a2a81..2eb6fcd 100644
--- a/social/backends/strava.py
+++ b/social/backends/strava.py
@@ -15,6 +15,7 @@ class StravaOAuth(BaseOAuth2):
# http://example.com/complete/strava?redirect_state=xxx?code=xxx&state=xxx
# Check issue #259 for details.
REDIRECT_STATE = False
+ REVOKE_TOKEN_URL = 'https://www.strava.com/oauth/deauthorize'
def get_user_id(self, details, response):
return response['athlete']['id']
@@ -38,3 +39,8 @@ class StravaOAuth(BaseOAuth2):
"""Loads user data from service"""
return self.get_json('https://www.strava.com/api/v3/athlete',
params={'access_token': access_token})
+
+ def revoke_token_params(self, token, uid):
+ params = super(StravaOAuth, self).revoke_token_params(token, uid)
+ params['access_token'] = token
+ return params
--
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