krakenjs / hapi-openapi

Build design-driven apis with OpenAPI (formerly swagger) 2.0 and hapi.
Other
211 stars 75 forks source link

Multiple authentication types is not fully supported #157

Open dcharbonnier opened 5 years ago

dcharbonnier commented 5 years ago

https://swagger.io/docs/specification/2-0/authentication/

The "AND" case is not supported

{
  "security": [
    {
      "signature": [],
      "expire": []
    },
    {
      "jwt": [ ]
    }
  ]
}
tlivings commented 5 years ago

This is probably a limitation to how hapi auth works. Note the "some APIs support" ... APIs built in hapi will not.

dcharbonnier commented 5 years ago

https://github.com/futurestudio/hapi-auth-multiple-strategies the logic is pretty simple maybe we should consider implementing it in hapi-openapi ?

tlivings commented 5 years ago

Happy to consider it. I don't have time to spend on it at the moment but would consider a PR for sure.