How to use API keys to secure web APIs in ASP.NET Core
Take advantage of API key authentication to control the access of applications and services to your Web APIs in ASP.NET Core.
Customapikeymiddleware Requestdelegate Addjsonfile Appsettings Visual Studio Task Invoke Context Request Headers Trygetvalue Context Response Statuscode
Source: infoworld.com