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

Support for AND of security schemas #74

Open
macfanatic opened this issue Feb 4, 2021 · 0 comments
Open

Support for AND of security schemas #74

macfanatic opened this issue Feb 4, 2021 · 0 comments

Comments

@macfanatic
Copy link

Currently I do not see a way to denote that an endpoint requires multiple security schemas via AND. Is there support for this?

# defined in our ApplicationController
components do
    api_key :field_1, field: 'X-Field-1', in: 'header'
    api_key :field_2, field: 'X-Field-2', in: 'header'
    api_key :field_3, field: 'X-Field-3', in: 'header'
end

# in initializer
global_security_require :field_1
global_security_require :field_2
global_security_require :field_3

This definition results in an array of security components, and they are set as OR.

In a YML specification, I'd write this as:

security:
  - field_1
    field_2
    field_3

Documentation: https://swagger.io/docs/specification/authentication/

Screen Shot 2021-02-04 at 12 17 02 PM

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