If you’re just using master branch, try to pull in the latest and try again first – there may have been related fixes.
From: <[email protected]> on behalf of Andrew Campbell <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Thursday, 4 August 2016 at 01:10 To: Swagger <[email protected]> Subject: Re: Multiple authentications and associated problems Hi Ron, I usually use the latest version from Git hub - I update every couple of weeks. Where do I check to find the precise version? Andrew On Wednesday, 3 August 2016 23:42:13 UTC+1, Ron wrote: Hello Andrew! Which version of swagger-ui do you use? From: <[email protected]> on behalf of Andrew Campbell <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, 3 August 2016 at 09:09 To: Swagger <[email protected]> Subject: Multiple authentications and associated problems I am having difficulty with my securityDefinitions object. My folder structure is like this: /api /console /swagger /file1.json /file2.json /swagger-ui We are not yet ready to make the console (or associated swagger files) available to the whole internet, so everything under /console is protected using Basic Authentication. Most of the API calls require apiKey authorization. If I just put the apiKey authorization in the securityDefinitions and then authorize via the Authorize button, and the json files are refreshed for any reason (such as changing from file1.json to file2.json) my browser displays an HTTP Basic Authentication dialog box, and no matter what values I enter, the dialog box just refreshes. If I put both the apiKey authorization and basic authorization in the securityDefinitions, then I can refresh the json files without any problems as long as I authorize with both the apiKey and basic, but all calls to the API seem to use just basic authentication and ignore the apiKey authorization. This is what my securityDefinitions object looks like: "securityDefinitions": { "Basic": { "type": "basic", "description": "You must enter your username and password" }, "Authorization": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "Fill out as described in the documentation" } } And this is an example of the curl that the console generates for me when authorised with both basic and apiKey: curl -X GET --header 'Accept: application/json' --header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx' 'http://example.com/api/call' What I want to get is curl -X GET --header 'Accept: application/json' --header 'Authorization: apiKey_value' 'http://example.com/api/call' Is there an easy solution to this problem? I'm inclined to think I should remove the Basic authentication and restrict access based on IP address. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
