oauth1.py 文件源码

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

项目:Sanic-OAuth 作者: Sniedes722 项目源码 文件源码
def clientgetter(self, f):
        """Register a function as the client getter.
        The function accepts one parameter `client_key`, and it returns
        a client object with at least these information:
            - client_key: A random string
            - client_secret: A random string
            - redirect_uris: A list of redirect uris
            - default_realms: Default scopes of the client
        The client may contain more information, which is suggested:
            - default_redirect_uri: One of the redirect uris
        Implement the client getter::
            @oauth.clientgetter
            def get_client(client_key):
                client = get_client_model(client_key)
                # Client is an object
                return client
        """
        self._clientgetter = f
        return f
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号