Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set correct status code of the error on token store fail #436

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

mayorova
Copy link
Contributor

In the native OAuth flow, when storing access token in 3scale backend fails, currently a 200 status code is returned. It doesn't seem to be the desired behavior, as there's the following line:

ngx.exit(stored.status)

It also provokes the following warning message:

*1 attempt to set status 400 via ngx.exit after sending out the response status 200

This PR fixes it, and returns to the client the status code that was returned by the 3scale backend on token store attempt.

@mayorova mayorova force-pushed the fix-oauth-store-token-code branch from 468f2eb to cfe6010 Compare September 28, 2017 12:26
@mayorova mayorova force-pushed the fix-oauth-store-token-code branch from cfe6010 to a4534dc Compare September 28, 2017 12:28
@mikz mikz merged commit 111f5e7 into master Sep 29, 2017
@mikz mikz deleted the fix-oauth-store-token-code branch September 29, 2017 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants