I have a swagger node express app and I am not sure how to have two security handlers?
I have two SecurityDefinitions in my swagger.yaml
securityDefinitions:
appKeyA:
type: apiKey
name: Authorization
in: header
appKeyB:
type: apiKey
in: header
name: X-APP-ID
in my route
/foo
security:
- appKeyA: []
appKeyB: []
So logical AND
In my app.js
app.use(
middleware.swaggerSecurity({
//manage token function in the 'auth' module
appKeyA: auth.verifyToken
})
);
It successfully runs the code in my verifyToken function
exports.verifyToken = function(req, authOrSecDef, token, callback) {
...
}
Now where do I put the second function to prevent getting Error: unknown security handler: appKeyB
Thanks