danielgolub / danielgolub/openapi-middleware
feat: add cookie support for authentication
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
when securityScheme is the following:
```yaml
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:
https://github.com/danielgolub/openapi-middleware/blob/091db91ff484b37fcbf4937fa421c69ace448d78/lib/SecurityValidator.js#L61-L66
And also add respective test case here (another param for cookie):
https://github.com/danielgolub/openapi-middleware/blob/091db91ff484b37fcbf4937fa421c69ace448d78/tests/unit/SecurityValidator.spec.js#L127
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.