views.py 文件源码

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

项目:network-pulse-api 作者: mozilla 项目源码 文件源码
def get_flow(self):
        """
        get the class-level-bound flow handler
        """
        if self.flow is None:
            self.flow = client.flow_from_clientsecrets(
                # we keep the creds in a separate file that we don't check in.
                'client_secrets.json',

                # we want to be able to get a user's name and email
                scope=' '.join([
                    'https://www.googleapis.com/auth/userinfo.email',
                    'https://www.googleapis.com/auth/userinfo.profile'
                ]),

                # this url-to-codepath binding is set up in ./users/urls.py
                redirect_uri=os.getenv('REDIRECT_URIS', '').split(',')[0],
            )

        return self.flow
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号