diff options
author | Tyler Jones <tyler@gumstix.com> | 2013-08-01 11:11:10 -0700 |
---|---|---|
committer | Tyler Jones <tyler@gumstix.com> | 2013-08-01 11:11:10 -0700 |
commit | c4a6c31ba9748947462e8e31e106215cca1d3cc9 (patch) | |
tree | 71fb95b2f9758527bc1ee17e66efd17f98780c30 /docs | |
parent | 6efc8c04e46d5a731962e2fae9b9599097c5a2d4 (diff) | |
download | oauthlib-c4a6c31ba9748947462e8e31e106215cca1d3cc9.tar.gz |
#199 Proposed API changes for endpoints.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/oauth1/server.rst | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/oauth1/server.rst b/docs/oauth1/server.rst index fa7e848..e62698d 100644 --- a/docs/oauth1/server.rst +++ b/docs/oauth1/server.rst @@ -297,7 +297,7 @@ The example uses Flask but should be transferable to any framework. @app.route('/request_token', methods=['POST']) def request_token(): - _, h, b, s = provider.create_request_token_response(request.url, + h, b, s = provider.create_request_token_response(request.url, http_method=request.method, body=request.data, headers=request.headers) @@ -324,14 +324,12 @@ The example uses Flask but should be transferable to any framework. def post_authorize(): realms = request.form.getlist('realms') try: - u, h, b, s = provider.create_authorization_response(request.url, + h, b, s = provider.create_authorization_response(request.url, http_method=request.method, body=request.data, headers=request.headers, realms=realms) - if status == 302: - return redirect(u) - elif: + if status == 200: return 'Your verifier is: ' + str(urlparse.parse_qs(b)['oauth_verifier'][0]) else: return Response(b, status=s, headers=h) @@ -341,7 +339,7 @@ The example uses Flask but should be transferable to any framework. @app.route('/access_token', methods=['POST']) def access_token(): - _, h, b, s = provider.create_access_token_response(request.url, + h, b, s = provider.create_access_token_response(request.url, http_method=request.method, body=request.data, headers=request.headers) |