Is your feature request related to a problem? Please describe.
when securityScheme is the following:
securitySchemes:
basicAuth:
type: 'apiKey'
in: 'cookie'
name: 'cookieParam'
we throw an exception. need to add cookie support here including tests.
Describe the solution you'd like
Follow official spec: https://swagger.io/docs/specification/authentication/
Add it to the enum here:
|
in: { |
|
type: 'string', |
|
// TODO: add cookie support for security "in" property |
|
eq: ['header', 'query'], |
|
optional: true, |
|
}, |
And also add respective test case here (another param for cookie):
|
apiKeyInQuery: { type: 'apiKey', in: 'query', name: 'authorizationQuery' }, |
Describe alternatives you've considered
N/A
Additional context
N/A
Is your feature request related to a problem? Please describe.
when securityScheme is the following:
we throw an exception. need to add cookie support here including tests.
Describe the solution you'd like
Follow official spec: https://swagger.io/docs/specification/authentication/
Add it to the enum here:
openapi-middleware/lib/SecurityValidator.js
Lines 61 to 66 in 091db91
And also add respective test case here (another param for cookie):
openapi-middleware/tests/unit/SecurityValidator.spec.js
Line 127 in 091db91
Describe alternatives you've considered
N/A
Additional context
N/A