z0mt3c / hapi-swaggered

Yet another hapi plugin providing swagger compliant API specifications based on routes and joi schemas to be used with swagger-ui.
MIT License
82 stars 38 forks source link

file upload does not respect bearer authentication #26

Closed jlines closed 9 years ago

jlines commented 9 years ago

I am using hapi-swaggered/hapi-swaggered-ui tools.

hapi-swaggered-ui is configured to use a bearer token in api calls via the following config

'hapi-swaggered-ui':{ authorization: { // see above field: 'Authorization', scope: 'header', // header works as well valuePrefix: 'Bearer '// prefix incase } },

This works great for most calls except file upload calls, which is configured using the method found in the hapi-swaggered documentation for file uploads. In the case of file uploads the configured auth is not sent and no bearer token field is used.

z0mt3c commented 9 years ago

Thanks for reporting! Seems to be a bug in swagger-ui/swagger-js... Reported here: swagger-api/swagger-js#407

z0mt3c commented 9 years ago

Now here: swagger-api/swagger-ui#1249

z0mt3c commented 9 years ago

fixed since hapi-swaggered-ui@1.5.0 (swagger-ui@2.1.0)