/usr/lib/python3/dist-packages/social/backends/moves.py is in python3-social-auth 0.2.13-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | """
Moves OAuth2 backend, docs at:
https://dev.moves-app.com/docs/authentication
Written by Avi Alkalay <avi at unix dot sh>
Certified to work with Django 1.6
"""
from social.backends.oauth import BaseOAuth2
class MovesOAuth2(BaseOAuth2):
"""Moves OAuth authentication backend"""
name = 'moves'
ID_KEY = 'user_id'
AUTHORIZATION_URL = 'https://api.moves-app.com/oauth/v1/authorize'
ACCESS_TOKEN_URL = 'https://api.moves-app.com/oauth/v1/access_token'
ACCESS_TOKEN_METHOD = 'POST'
EXTRA_DATA = [
('refresh_token', 'refresh_token', True),
('expires_in', 'expires'),
]
def get_user_details(self, response):
"""Return user details Moves account"""
return {'username': response.get('user_id')}
def user_data(self, access_token, *args, **kwargs):
"""Loads user data from service"""
return self.get_json('https://api.moves-app.com/api/1.1/user/profile',
params={'access_token': access_token})
|