I am also using hapi-auth-jwt as my default auth strategy. My JWT auth strategy calls a validation function to determine if the given JWT is valid. For all my APIs this validation function is called, except the route for file uploading (i.e. the one above). The above route gives me a 401 error, but does not call the validation function.
I can set auth to false, but I don't want anyone to be able to upload files to my database. I'm not sure if this is an issue with hapi-swagger or hapi-auth-jwt, but I can only repeat the error with the above code so I posted it here.
Nevermind. I had written my own stuff to allow the user to add a JWT in the Swagger UI, but I had not hooked correctly into the file upload part of swagger-ui.js
I have added file uploading in the same way as the example code
I am also using hapi-auth-jwt as my default auth strategy. My JWT auth strategy calls a validation function to determine if the given JWT is valid. For all my APIs this validation function is called, except the route for file uploading (i.e. the one above). The above route gives me a 401 error, but does not call the validation function.
I can set auth to false, but I don't want anyone to be able to upload files to my database. I'm not sure if this is an issue with hapi-swagger or hapi-auth-jwt, but I can only repeat the error with the above code so I posted it here.