how do you lock the swagger ui on the asp.net so that only authenticated users gets to see the API end points.
Swagger does not support user based visuals, if you want to do this you would have to include something in middleware to look for the /swagger url and check for any authenticated sessions.
Another possible work around can be found here;