We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a scenario where a route should only be protected by basic auth for certain methods:
@app.route("/items", methods=["GET"]) @basic_auth.required def list_items(): ... @app.route("/items", methods=["POST"]) def create_item(): ...
That's because POSTing requires a bearer token instead of basic auth:
POST
> GET /items > Authorization: Basic ... > POST /items > Authorization: Bearer ...
However, it seems the required decorator does not take into account the method, so with the code above, both handlers are basic auth-protected.
required
The text was updated successfully, but these errors were encountered:
Why does POSTing require a bearer token?
The Wikipedia page doesn't mention that: https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side
Sorry, something went wrong.
No branches or pull requests
I have a scenario where a route should only be protected by basic auth for certain methods:
That's because
POST
ing requires a bearer token instead of basic auth:However, it seems the
required
decorator does not take into account the method, so with the code above, both handlers are basic auth-protected.The text was updated successfully, but these errors were encountered: