Open iamakimmer opened 5 years ago
I have configured my swagger to optionally taken in a api key or jwt key:
security:
and my middleware to
app.use(middleware.swaggerSecurity({ JWTPublicKeyHeader: function(req, def, scopes, callback) { //logic }, APIKeyHeader: function(req, def, scopes, callback) { //logic } }));
If i have a request and I'm only sending a JWTPublicKeyHeader, it still goes through the APIKeyHeader middleware in which no keys exist and will fail. How do I ignore this middleware from being called as I'm only sending 1 key?
I have the same problem
I have configured my swagger to optionally taken in a api key or jwt key:
security:
and my middleware to
If i have a request and I'm only sending a JWTPublicKeyHeader, it still goes through the APIKeyHeader middleware in which no keys exist and will fail. How do I ignore this middleware from being called as I'm only sending 1 key?