How to Create Custom Policies In Blazor (.Net Core)
Todays video is an extension of the last one regarding the Admin Tutorial. It is working directly off of where that one ended as we will be designing customized policies. Policies are very flexible and you can build your own to handle all sorts of logic in order to make sure the right credentialed user has access to the areas of your program you want them to access. So here is a tutorial in how to implement that in your Blazor Server project.
Admin Tutorial Video: https://youtu.be/zKyaSbYhOm8
Microsoft Docs: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-6.0
Limited Time Discord Link: https://discord.gg/T3Q5jJrW
Perhaps you need a bit of guidance in landing the job, passing the interview or succeeding in your Software Career? Book a session:
https://contractlancer.com/
00:00 Intro
01:06 Project Start
02:47 Problem With Roles
03:48 Adding Authorization Policy Service
04:40 Single Requirement Policy
07:13 Adding MinimumRequirement Class
09:09 Adding MinimumRequirementHandler
19:36 Multiple Requirement Policies
20:41 Adding Multiple Requirement Class
22:05 Multiple Requirement handler
Fair Use and Resources:
Chill Jazzy Hip Hop Royalty Free Jazz Hop Music
Abstract Atmospheric Background by Jorik Basovkground