I\'m working on a Swagger (Web API) project. When I first run the application it shows the Login page for Swagger UI. So, a user first has to login to access Swagger UI
You can take a look this link which describes how to lock down the Swagger UI so that only authenticated users can see it
http://knowyourtoolset.com/2015/09/secure-web-apis-with-swagger-swashbuckle-and-oauth2-part-4/