Basic authentication: How to add in ASP.NET Core
Basic authentication is used in a HTTP request by adding a Base64 encoded username and password to the Authorization header.
It is used in OAuth as part of the client credentials flow for requesting an access token in the form of a Bearer token.
This .NET tutorial will show you what Basic authentication is, and how to format the username and password.
Afterwards, we'll add this security to an ASP.NET Core Web API by creating an authentication handler which handles the authentication of the client.
Finally, we'll add it to a controller and test it using Swagger.
? Download the code sample for this tutorial?
https://www.roundthecode.com/dotnet-code-examples/basic-authentication-asp-net-core?utm_source=youtube&utm_medium=referral&utm_campaign=rGfxURLQp7o+-+video+content+%28code+sample%29
? Learn .NET and C# with our online courses ?
https://www.roundthecode.com/dotnet-courses?utm_source=youtube&utm_medium=referral&utm_campaign=rGfxURLQp7o+-+video+content+%28online+course%29
► More information:
https://www.roundthecode.com/dotnet-tutorials/what-is-basic-authentication-how-to-add-in-asp-net-core?utm_source=youtube&utm_medium=referral&utm_campaign=rGfxURLQp7o+-+video+content+%28more+information%29
► Chapters
0:00 Coming up...
0:20 Learn with .NET online courses
0:30 What is Basic authentication?
1:22 Basic Authentication in OAuth
2:00 NuGet packages
2:32 Authorize attribute
3:50 Client identity
4:59 Authentication handler
12:25 Program.cs configuration
15:14 Set up in a controller
16:16 Test in Swagger
17:19 How to purchase the code sample
#oauth #authentication #dotnet
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Basic authentication: How to add in ASP.NET Core», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.