.NET Blazor |Secure your API Controller Endpoint for ONLY Authenticated User using CustomHttpHandler

Published: 25 August 2023
on channel: Netcode-Hub
861
18

Are you looking for Coding Mentoring? If you're seeking personalized guidance and mentoring for your coding journey, then get in touch!. I offer expert guidance and support to help you level up your programming skills. Contact me on [email protected] to book a session and accelerate your coding career.

Hello friends, welcome, in this video, I will explain and show you how to secure your API controller action methods by creating Custom HTTP Handler to add Bearer token to all HTTP requests and refuse to provide service to all requests coming in without the Bearer token.

Thanks so much for watching 🙌🏾 LIKE 👍, SUBSCRIBE & turn on Notifications 🔔 to know when I upload new videos EVERYDAY!

/*You can buy a coffee for me*/ ☕️
https://www.buymeacoffee.com/NetcodeHub

/*Get Intouch with Us*/
Netcode Developers' Community : https://teams.live.com/l/community/FE...
Microsoft Team : https://teams.live.com/l/invite/FEA8U...

/*Documentation*/
Blazor Authentication and Authorization | https://learn.microsoft.com/en-us/asp....
Pass tokens to a Blazor Server app | https://learn.microsoft.com/en-us/asp...

/*Blazor Playlist*/
Blazor Playlist |    • .NET 6 & 7 Blazor For Beginners  

/*Get Source code*/
GitHub | https://github.com/Netcode-Hub/DemoBl...

/*Check this out*/
   • .NET Blazor |Secure your API Controll...   | Blazor Web Assembly Custom Authentication using JWT and Authentication State Provider.

/*Chapters*/
00:00 Reviewing previous lesson and introduction to current lesson.
11:50 Protecting API endpoints with Authorize attribute.
16:25 Install JWT Bearer package.
16:55 Configuring JWT Bearer service.
29:00 Creating Custom HTTP Handler.
35:32 Install HTTP Client factory NuGet package.
36:32 Registering the Custom HTTP Handler in attach to HTTP Client.
38:08 Updating all method which use Http Client for request and response.
39:07 Testing the Handler process.
45:02 Displaying [Not authorize] to unauthorized users.
46:15 Hide Login and Register razor components from authenticated users.
50:00 Redirect unauthenticated user to login page when they try to access the app.
54:40 Conclusion.

/*Follow Netcode-Hub*/
https://netcodehub.blogspot.com
https://github.com/Netcode-Hub | Grab projects source code from here.
  / netcodehub   | Twitter
  / netcodehub   | Facebook
  / netcode-hub-90b188258   | LinkedIn


Watch video .NET Blazor |Secure your API Controller Endpoint for ONLY Authenticated User using CustomHttpHandler online without registration, duration hours minute second in high quality. This video was added by user Netcode-Hub 25 August 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 861 once and liked it 18 people.