Policy based Authorization with Custom Authorization Handler | ASP.NET Core Identity Series | Ep 11

preview_player
Показать описание
🎁ALL-ACCESS Subscription: Unlock access to all of my courses, both now and in the future at a low $19.99 / month.

💎Learn .NET MAUI while creating a Contacts App in .NET 7:

🔥Learn Blazor while creating an Inventory Management System in .NET 6

💎 Complete Guide to ASP.NET Core Identity

💎Complete Blazor Course: Build an e-commerce app with ASP.NET Blazor and Clean Architecture

💎 Complete Web API Course:

👍Architecture Course

Рекомендации по теме
Комментарии
Автор

Thanks a lot to you my friend! No one give such a great course about Razor Auth methods, but you!! You are In my heart forever!

DOMINATOR-ounz
Автор

Again a great explanation.

I would personally have done the test on ProbationMonths like the following, as not every month has 30 days:
_if < DateTime.Now.Date)_

Also it would have been nice to have added an example on how to check the requirements in the page itself so you wouldn't show the link if the user doesn't have the requirements:
(I wanted to know so I checked it out myself)

If you want to check the separate claims only, you can use the following in the page:

_{_
_<a />_
_}_

And if you want to check the full requirements/policy use the following in the page (best to put the using/inject into the __ViewImports.cshtml_):

_{_
_<a href="HRManager">Human Resource Manager Page</a><br />_
_}_

SuperDre
Автор

Waiting for your videos always ...thank you

shashikantpawar
Автор

Nice one with good explanation. Please keep post good real time samples and implementation

chithurajjeyaram
Автор

Thanks for sharing this great resource, Best of Luck

adamnorman
Автор

Nice exploration, thanks!
Just a question please, how could we implement a custom policy for manipulating a specific db records, for example users have a permission to getAllCustomer info for a custom defined city for these customers

What is the idea? Thanks in advance 🎉

mohammedabujayyab
Автор

Hello Frank, nice video. I'm assuming the policy is used in a controller to limit the access. I have a question. Instead of putting the months requirement in the policy definition, is it possible to pass that number through the policy attribute on the controller method? I'm asking because I would much rather create a single authorization handler and policy for a given module in my application, and then pass the parameter in the controller, than create multiple policies with the parameter hard coded. Hope that made sense.

Andrewkc
Автор

is it standard practice to name the folder Authorization?

henrik
Автор

Is it possible to do a DB query in the Handler to check that a claim matches something in the db ?

alsh
Автор

how to prevent 2 registered user with same role to not access each other data?

xwqureg