2
Mixcloud OAuth2 backend, docs at:
3
https://python-social-auth.readthedocs.io/en/latest/backends/mixcloud.html
5
from .oauth import BaseOAuth2
8
class MixcloudOAuth2(BaseOAuth2):
11
AUTHORIZATION_URL = 'https://www.mixcloud.com/oauth/authorize'
12
ACCESS_TOKEN_URL = 'https://www.mixcloud.com/oauth/access_token'
13
ACCESS_TOKEN_METHOD = 'POST'
15
def get_user_details(self, response):
16
fullname, first_name, last_name = self.get_user_names(response['name'])
17
return {'username': response['username'],
20
'first_name': first_name,
21
'last_name': last_name}
23
def user_data(self, access_token, *args, **kwargs):
24
return self.get_json('https://api.mixcloud.com/me/',
25
params={'access_token': access_token,