base.py 文件源码

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

项目:cloudstrype 作者: btimby 项目源码 文件源码
def __init__(self, client_id, client_secret, user=None, storage=None,
                 redirect_uri=None, token=None, token_callback=None, **kwargs):
        self.client_id = client_id
        self.client_secret = client_secret
        self.user = user
        self.storage = storage
        self.token = token or {}
        self.token_callback = token_callback
        if self.token:
            # We already have a token, pass it along.
            self.oauthsession = OAuth2Session(
                token=self.token, **kwargs)
        else:
            # We have yet to obtain a token, so we have only the client ID etc.
            # needed to call `authorization_url()` and get a token.
            self.oauthsession = OAuth2Session(
                self.client_id, redirect_uri=redirect_uri,
                scope=self.SCOPES, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号