def _authenticate(self, data):
async with aiohttp.request('GET', '{}/oauth2/profile'.format(settings.OSF['ACCOUNTS_URL']), headers={
'Authorization': 'Bearer {}'.format(data.get('access_token'))
}) as resp:
if resp.status != 200:
raise exceptions.Unauthorized()
return 'user', 'osf', (await resp.json())['id']
# TODO Fuzz test me
评论列表
文章目录