0

I've been attempting to set up Swagger Spring-MVC and Swagger UI using the latest version of the SpringMVC implementation here : Swagger Spring-MVC

I've been able to get the initial setup working, but when I introduce the entry-point-ref for authentication to http for returning customer error response incase of Authentication or Authorization error, I get an error saying that it can't access my api. When I look in firebug, it says that it's getting a 401 Unauthorized.

In my initial setup first navigate to the SwaggerUI URL, a dialog pops up for me to enter my user-name and password. I know it's correct because I can manually use my resources with the same credentials.

But after adding that entry-point-ref for customAuthenticationEntryPoint, it started failing with 401 Unauthoized.

Does anyone know what my solution would be? Thanks in advance.

Mohan
  • 699
  • 1
  • 11
  • 27
  • 1
    I think you need to set the api-key in swagger correctly for this. Please check this out - http://stackoverflow.com/questions/29817270/using-an-api-key-secret-for-swagger-security-scheme – Sampada Mar 16 '16 at 05:52
  • 1
    Found another similar issue here - http://stackoverflow.com/questions/16899515/how-to-get-swagger-to-send-api-key-as-a-http-instead-of-in-the-url – Sampada Mar 16 '16 at 05:54

0 Answers0