You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to connect to some server-side code generated from SwaggerHub, using swagger v2.0 syntax. While the server code seems to work fine, the client node only receives 403 denied responses, since the client never sends the X-API-Key in the request header. I believe this is a bug in this code that I just commented on (the scheme object has undefined "keyname" and "passAs" properties).
switch(scheme.type) {
case 'apiKey':
node.swaggerClient.clientAuthorizations.add(scheme.name,
new SwaggerClient.ApiKeyAuthorization(scheme.keyname, password, scheme.passAs));
break;
The relevant securityDefinitions section of the swagger.json file looks like this:
Since every endpoint is using the same security key, the global security object is defined as:
"security" : [ {
"ApiKeyAuth" : [ ]
} ],
Please let me know what is missing -- or how I can debug this missing header key!
__
Steve
The text was updated successfully, but these errors were encountered:
shrickus
changed the title
APIKey authorization disconnect when using SwaggerHub v2 definitions
APIKey authorization header is missing when using SwaggerHub v2 definitions
Sep 5, 2018
I'm trying to connect to some server-side code generated from SwaggerHub, using swagger v2.0 syntax. While the server code seems to work fine, the client node only receives 403 denied responses, since the client never sends the
X-API-Key
in the request header. I believe this is a bug in this code that I just commented on (thescheme
object has undefined "keyname" and "passAs" properties).The relevant
securityDefinitions
section of the swagger.json file looks like this:Since every endpoint is using the same security key, the global
security
object is defined as:Please let me know what is missing -- or how I can debug this missing header key!
__
Steve
The text was updated successfully, but these errors were encountered: