From 136e012f05bcb20f25954a7aa0893a6da5b87b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Miguel=20Neves?= Date: Sun, 19 Jul 2015 20:02:16 +0100 Subject: [PATCH] support for goclio.eu service --- social/backends/goclioeu.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 social/backends/goclioeu.py diff --git a/social/backends/goclioeu.py b/social/backends/goclioeu.py new file mode 100644 index 000000000..f5b36c46b --- /dev/null +++ b/social/backends/goclioeu.py @@ -0,0 +1,14 @@ +from social.backends.goclio import GoClioOAuth2 + + +class GoClioEuOAuth2(GoClioOAuth2): + name = 'goclioeu' + AUTHORIZATION_URL = 'https://app.goclio.eu/oauth/authorize/' + ACCESS_TOKEN_URL = 'https://app.goclio.eu/oauth/token/' + + def user_data(self, access_token, *args, **kwargs): + """Loads user data from service""" + return self.get_json( + 'https://app.goclio.eu/api/v2/users/who_am_i', + params={'access_token': access_token} + )