An open API service indexing awesome lists of open source software.

https://github.com/aimenux/basicauthenticationdemo

Adding basic authentication to web api projects
https://github.com/aimenux/basicauthenticationdemo

basic-authentication controller-api minimal-api net80 web-api

Last synced: 11 months ago
JSON representation

Adding basic authentication to web api projects

Awesome Lists containing this project

README

          

[![.NET](https://github.com/aimenux/BasicAuthenticationDemo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/aimenux/BasicAuthenticationDemo/actions/workflows/ci.yml)

# BasicAuthenticationDemo

```
Adding basic authentication to web api projects
```

In this repo, i m using various ways to support basic authentication in web api projects
>
> :one: `Example01` use controller api with basic authentication based on middlewares
>
> :two: `Example02` use minimal api with basic authentication based on middlewares
>
> :three: `Example03` use controller api with basic authentication based on authorisation filters (applied globally)
>
> :four: `Example04` use minimal api with basic authentication based on endpoint filters (applied globally)
>
> :five: `Example05` use controller api with basic authentication based on authorisation filters (applied by route)
>
> :six: `Example06` use minimal api with basic authentication based on endpoint filters (applied by route)
>
> :seven: `Example07` use controller api with basic authentication based on a custom authentication scheme
>
> :eight: `Example08` use minimal api with basic authentication based on a custom authentication scheme
>
**`Tools`** : net 8.0, web api, integration-testing, fluent-assertions, nsubstitute, xunit