Introduction To Permission Authorization In ASP.NET Core 7 | Permission Authorization - Part 1

Introduction To Permission Authorization In ASP.NET Core 7 | Permission Authorization - Part 1

Milan Jovanović

1 год назад

42,599 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

abuzer285
abuzer285 - 23.09.2023 17:15

What is the starting point of this project? I would love to do this gatherly app.

Ответить
Ryan Temple
Ryan Temple - 31.07.2023 22:25

Hi Milan! Your videos are awesome I am here coming from the Clean Architecture course. And I wondered how you got a reference to get the permission attribute from the Infrastructure project in your controllers. I thought the presentation layer only references the Application layer?

Ответить
Angelo Piletti
Angelo Piletti - 10.07.2023 15:13

Amazing series

Ответить
MCDaddy
MCDaddy - 08.06.2023 18:02

Smahed that liked button 💪

Ответить
liam pillay
liam pillay - 28.05.2023 19:06

Thank you 🎉🎉🎉

Ответить
tech pc
tech pc - 16.04.2023 23:10

Ответить
alex g
alex g - 12.12.2022 09:22

Fantastic video

Ответить
Amir Kamolov
Amir Kamolov - 09.12.2022 14:03

Hello. I have a more complicated authorization problem. I need to implement resource-dependent authorization. For example, so that the user can access only those records to which he has access. Can you give me some advice ?

Ответить
Harlan Siegel
Harlan Siegel - 08.12.2022 20:39

Milan, I've found that running the program after implementing these changes throws an exception. I initially thought it was something that I had done, but after loading the source code from Patreon, I'm getting the same error. I was wondering if you ran into the same issue and if you know the fix. The exception is: System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Authorization.IAuthorizeData Lifetime: Scoped ImplementationType: Gatherly.Infrastructure.Authentication.HasPermissionAttribute': Unable to resolve service for type 'Gatherly.Infrastructure.Authentication.Permission' while attempting to activate 'Gatherly.Infrastructure.Authentication.HasPermissionAttribute'.)'

Ответить
Fernando Calmet
Fernando Calmet - 04.12.2022 03:52

This is one of the series I've been waiting for the most. I enjoy and learn a lot with your content, thank you very much for sharing Milan.😃

Ответить
Sean Vogel
Sean Vogel - 03.12.2022 23:56

Hmmm. You could say nameof(policy)

Ответить
LimitedWard
LimitedWard - 03.12.2022 12:31

One important security tip when implementing permission scopes like this: the default behavior for any endpoint should be to deny all requests if no permission scopes are specified. If you don't implement it this way, you could easily forget to restrict an important endpoint and inadvertently introduce vulnerabilities.

Ответить
វីដេអូកំសាន្ត របស់នីសានឹងជូលី
វីដេអូកំសាន្ត របស់នីសានឹងជូលី - 03.12.2022 11:54

Every your videos is very usefull @Milan

Ответить
Richard Ariel Cruz Céspedes
Richard Ariel Cruz Céspedes - 03.12.2022 07:21

This is very useful, please keep going with this. I looking forward to seeing part 2

Ответить
AliReZa Sabouri
AliReZa Sabouri - 03.12.2022 01:10

How the comment spam detection works in this channel !? 🤷‍♂
If you can check out your spam comments at least 😅😅🤦‍♂
I tried to suggest something 20 different ways but I failed.

Ответить
Johan Bennink
Johan Bennink - 02.12.2022 23:47

@Milan I must be missing something. After saying that Roles and Policies have to be hardcoded you implement HasPermission as a subclass of the same attribute, Authorize, and then call the constructor of that attribute with your permission value as Policy. So in fact we are still using the Authorize attribute with the policy parameter. How is this improving things? Or are you going to implement something different than calling the base constructor in part 2 ?

Ответить
Mahdi Ghanbari
Mahdi Ghanbari - 02.12.2022 22:45

Great stuff. I have one question and that is why you define the class as sealed in the controller and the HasPermission class either?

Ответить
elpe21
elpe21 - 02.12.2022 19:52

Great stuff, waiting for part 10 ;-)

Ответить
Recep Çiftçi
Recep Çiftçi - 02.12.2022 18:48

Really excited about your future videos. Awesome work!

Ответить
Max Supercars
Max Supercars - 02.12.2022 17:13

Great vid! Looking forward for next parts! The authorization is the basic part of every enterprise web application. Thanx! 🙂

Ответить
nove
nove - 02.12.2022 17:04

Awesome video! Keep them coming

Ответить
Cyril Douglas
Cyril Douglas - 02.12.2022 15:46

Using enum is really a great choice for this scenario, kindly waiting for the part 2, thanks for the efforts you put into this.

Ответить
Lasinda Dilshan
Lasinda Dilshan - 02.12.2022 15:34

Great!

Ответить
saurav bhatta
saurav bhatta - 02.12.2022 15:03

Keep coming homie!

Ответить