0

我试图从http://tech.shift.com/post/40299429203/implementing-a-python-oauth-2-0-provider-part-2运行 oauth 提供程序。

但是行:

flask_res = flask.make_response(response.text, response.status_code)

产生错误:

flask_res = flask.make_response(response.text, response.status_code)
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 616, in text
if not self.content:
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 594, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 541, in generate
chunk = self.raw.read(chunk_size, decode_content=True)
TypeError: read() takes no keyword arguments

为什么?:|

4

1 回答 1

0

这并不是您问题的真正解决方案。但是你真正想要的是一个 oauth2 服务器,对吧?

http://lepture.com/en/2013/create-oauth-server

于 2013-12-22T15:19:22.013 回答