ASP.NET Core with optional authentication/authorization

后端 未结 2 492
滥情空心
滥情空心 2020-12-21 04:39

I want to build an ASP.NET Core based WebApi for accessing data from a database. This WebApi could be used in two ways, either as a public WebApi which would need authentica

2条回答
  •  执笔经年
    2020-12-21 05:14

    I would recommend to authenticate both applications: web application and the Web API one. You will have everything secured. For skipping an authentication that is not a good idea. Simply create an user for your web application (in the Web API application) which will be used to authenticate when getting data from the Web API.

提交回复
热议问题