你的位置: 码友网首页 / 资讯源列表 / Securing ASP.NET Core WebApi with an API Key

关于[Securing ASP.NET Core WebApi with an API Key]的摘要:

I read the article from Aram Tchekrekjian, which he goes in great length about techniques to secure a Web API, that is, using a Middleware and using an attribute that uses the IAsyncActionFilter. I would like to add another technique to this list using also an attribute, but one that uses the IAsyncAuthorizationFilter instead. This filter is called earlier in the chain of filters and can stop early a bad request using an invalid API Key. To learn more about filters, check out the documentation. I will use the starter ASP.NET Core 3 API template that comes with dotnet. You can create it through Visual Studio or using the command line dotnet new webapi . In my scenario, I will use a combination of Client Id/Api Key.

原文地址: https://www.domstamand.com/securing-asp-net-core-webapi-with-an-api-key/

收录时间: 2020-09-15 浏览量: 1173 分类: ASP.NET Core

| 0 收藏 | 0