Restrict access to certain API controllers in Swagger using Swashbuckle and ASP.NET Identity

前端 未结 3 1864
一个人的身影
一个人的身影 2020-12-16 15:25

So, I started using Swagger. I\'m absolutely in love with it\'s features, but I have some doubts on availability of all methods to public.

As far as I understood -

3条回答
  •  醉酒成梦
    2020-12-16 16:07

    Created new folder called "swagger" in the project root. The folder name should match the url to the swagger documentation.

    Added new Web.config file in the newly created folder.

     
     
     
     
     
     
     
     
     
    
    

    answer found here.

    Another option will be:

    "Off the top of my head I would say a DelegatingHandler is what you need here."

    answer found here.

提交回复
热议问题