flask-oauthlib

Testing flask-oauthlib locally without https

不问归期 提交于 2019-12-03 06:23:22
问题 I have implemented an oauth2 server and an oauth2 client using flask-oauthlib. When I am trying to test locally, the client returns an InsecureTransportError and tells me that I should be using https. Is there a way to test the app locally without https? The client is running on 127.0.0.2:5000 and the server is running on 127.0.0.1:5000. Thanks 回答1: From http://requests-oauthlib.readthedocs.org/en/latest/examples/real_world_example.html: You should note that Oauth2 works through SSL layer. If

Testing flask-oauthlib locally without https

泄露秘密 提交于 2019-11-30 02:54:22
I have implemented an oauth2 server and an oauth2 client using flask-oauthlib. When I am trying to test locally, the client returns an InsecureTransportError and tells me that I should be using https. Is there a way to test the app locally without https? The client is running on 127.0.0.2:5000 and the server is running on 127.0.0.1:5000. Thanks Hans Z. From http://requests-oauthlib.readthedocs.org/en/latest/examples/real_world_example.html : You should note that Oauth2 works through SSL layer. If your server is not parametrized to allow HTTPS, the fetch_token method will raise an oauthlib