-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
For validation of request with security schemes are there any default options.AuthenticationFunc #269
Comments
The default is the noop defined at
For a more involved example take a look at kin-openapi/openapi3filter/validation_test.go Lines 598 to 614 in 5f67f43
Of course if you can share your own implementations the community as a whole would profit. :) |
Thanks ! I am facing issue when i have security set as "api_key" for the swagger pet API example . It fails even if I pass api_key in header , But as per NoopAuthenticationFunc implementation It should not fail, I am just using the code in the README.md i.e, not passing any options.AuthenticationFunc. So I was curious why it was failing .Getting this error
|
Indeed I was wrong: the func is unset in DefaultOptions and so fail-safe. The API consumer must define their own func if they have defined security requirements. |
For validation of request with security schemes are there any default options.AuthenticationFunc or do we need to explicitly pass our own Authentication Function check through RequestValidationInput as done in the tests. Was not able to find any examples or documentation regarding that.
The text was updated successfully, but these errors were encountered: