☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: / milanjovanovic
API Key Authentication is commonly used in S2S scenarios. You provide the API caller a unique key that they use to authenticate with your API. The API Key can be sent in a few ways. For example, it can be sent in a request header, the query string, or in a cookie. I'll show you how to implement API Key authentication in Minimal APIs and how to do it with controllers.
Join my weekly .NET newsletter:
www.milanjovanovic.tech
How To Implement API Key Authentication In ASP.NET Core
www.milanjovanovic.tech/blog/...
Read my Blog here:
www.milanjovanovic.tech/blog
Subscribe for more:
/ @milanjovanovictech
Chapters
0:00 Defining an endpoint filter
1:50 Implementing ApiKeyAuthenticationEndpointFilter
6:45 How an endpoint filter works
8:37 Validating the API key
12:32 Alternatives to sending the API key in the header
13:22 Alternatives to storing API keys in the application configuration
14:12 API key authentication with controllers
1 авг 2024