How to Add Basic Authentication to an ASP.NET Core Application: OAuth Security - Part 1

Опубликовано: 31 Декабрь 2024
на канале: Round The Code
6,752
84

An updated version of this video is available here:    • Basic authentication: How to add in A...  

We have a look at integrating Basic authentication into an ASP.NET Core application.

The whole point of setting up Basic authentication is so we can use it when we set up OAuth security.

First, we have a look at how Basic authentication works, and how we can add it to the HTTP request. By adding a base 64 encode of the username and password, we can add it to the Authorization HTTP request header.

Afterwards, we go ahead and write our own attribute. This attribute will be governed by a handler that we will write specifically for Basic authentication.

Finally, we set up a new authentication scheme specifically for Basic authentication. In-addition, we will go ahead and create a new authorisation policy.

📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...

► More Information: https://www.roundthecode.com/dotnet/h...

► OAuth Security Playlist:    • Playlist  

#aspnetcore #basicauthentication #oauth