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

Multiple security requirements for an operation should be validated as a logical AND bw schemes #112

Open
subeeshcbabu-zz opened this issue Sep 29, 2016 · 0 comments

Comments

@subeeshcbabu-zz
Copy link
Member

  • If there are more than one required security schemes, defined for an operation, the security auth handler should have been validating all the security requirements. But the current code passes the check if at least one security check succeeds.

The code here returns passed = true, if at least one of the requirement passes.

async.some(Object.keys(security), passed, done);

This should be a logical AND instead of OR, as per the swagger spec 2.0.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-requirement-object

Lists the required security schemes to execute this operation. The object can have multiple security schemes declared in it which are all required (that is, there is a logical AND between the schemes).

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

No branches or pull requests

1 participant