osf.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:jamdb 作者: CenterForOpenScience 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号