ASP.NET Core 5.0 – Authentication/Authorization – .Net Engineering Forum 2021-01-26



ASP.NET Core 5.0 – Authentication/Authorization – .Net Engineering Forum 2021-01-26

ASP.NET Core 5.0 - Authentication/Authorization - .Net Engineering Forum 2021-01-26

PART 1: Authentication and Authorization is one of the hardest topics to understand. In this video, we try to break it down into simple pieces with straightforward sample code in C#. Tony Spencer presents a primer on Authentication/Authorization in ASP.NET Core 5.0 (valid for 3.1 and 6.0 full API/MVC).

Authentication in ASP.NET Core 5.0 series:
https://mobiletonster.com/area/code – website with companion articles & code
PART 1 – (this video) – https://youtu.be/BWa7Mu-oMHk
PART 2 – (Challenge Scheme) – https://youtu.be/K0Z7GTOvbMo
PART 3 – (IDaaS & Multiple Providers) – https://youtu.be/Cej_u3fb9rI
PART 3a – (Connect SQLite DB) – https://youtu.be/z-Hll4Xddjs

Chapters
0:00 Intro
0:23 Overview
1:03 Identity example clip
1:46 Authorization example clip
2:41 Creating sample app in Visual Studio 2019
5:00 Adding the secured route
7:18 The forgetful doorman
9:16 Connecting cookie authentication handler to services in Startup.cs
13:20 Building the login page
17:36 Redirecting user back to original url after login
22:00 Calling SignInAsync() method
29:12 Handling incorrect username/password
32:05 Hooking up logout
36:35 Adding a claim (user’s name) to the list of claims
38:31 Exploring signin events in cookie authentication
44:34 Using roles for authorization
46:41 Creating custom “access denied” page
48:22 Adding custom role claim to user
53:08 Final thoughts

Intro includes music:
Spend My Time With You (Electro Swing Remix) – 11 Acorn Lane
http://www.11acornlane.com
https://www.youtube.com/watch?v=zPMNu8pX2zw

Sweet – I.Y.F.F.E. & Auratic & Au5

Other music:
Mosswood – Steve Adams (YouTube Music Library)

Comments are closed.