Skip to content

aimenux/ApiKeyAuthenticationDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET

ApiKeyAuthenticationDemo

Adding api key authentication to web api projects

In this repo, i m using various ways to support api key authentication in web api projects

1️⃣ Example01 use controller api with api key authentication based on middlewares

2️⃣ Example02 use minimal api with api key authentication based on middlewares

3️⃣ Example03 use controller api with api key authentication based on authorisation filters (applied globally)

4️⃣ Example04 use minimal api with api key authentication based on endpoint filters (applied globally)

5️⃣ Example05 use controller api with api key authentication based on authorisation filters (applied by route)

6️⃣ Example06 use minimal api with api key authentication based on endpoint filters (applied by route)

7️⃣ Example07 use controller api with api key authentication based on a custom authentication scheme

8️⃣ Example08 use minimal api with api key authentication based on a custom authentication scheme

Tools : net 7.0, web api, integration-testing, fluent-assertions, nsubstitute, xunit

Releases

No releases published

Packages

No packages published

Languages