Role Based Authorization With Identity and ASP.NET Core Web API

  Рет қаралды 3,624

Code Maze

Code Maze

Күн бұрын

Пікірлер: 17
@CodeMaze
@CodeMaze 6 ай бұрын
Thank you all for watching and for your support. ►► If you want to check out all our courses you can do that here: courses.code-maze.com/courses/
@10Totti
@10Totti 6 ай бұрын
Another best Tutorial! Thanks!
@CodeMaze
@CodeMaze 6 ай бұрын
You're welcome! Thank for watching this one.
@Tamer_Ali
@Tamer_Ali 6 ай бұрын
Thanks a lot for the video I hope you take about Permissions and Access Control
@CodeMaze
@CodeMaze 6 ай бұрын
Thanks for the suggestion and watching the video.
@ugochukwuumerie6378
@ugochukwuumerie6378 6 ай бұрын
I second that too 👌🏼
@Nims99
@Nims99 15 күн бұрын
Thanks!!! ❤
@CodeMaze
@CodeMaze 14 күн бұрын
You are very welcome. Thank you too for watching the video.
@Nims99
@Nims99 13 күн бұрын
@@CodeMaze ❤
@РоманКозакевич-х3э
@РоманКозакевич-х3э 4 ай бұрын
Найкращий!! Дякую вам і Слава Україні !
@CodeMaze
@CodeMaze 4 ай бұрын
I am glad you find the video helpful.
@anilanandachakrabortty1416
@anilanandachakrabortty1416 6 ай бұрын
Also, can you please make a video on dynamic roles for role based authorization and how to mapped that dynamic role value in the controller method?
@CodeMaze
@CodeMaze 6 ай бұрын
Interesting suggestion. I will see what I can do about that. Thanks for that.
@shahryarsaljoughi6073
@shahryarsaljoughi6073 4 ай бұрын
Thank you, perfect as always. It would be good if you could elaborate more on Role required properties as you initialized them. The original source code of RoleManager does a bit of complex logic for validation before setting those properties. I'm afraid I may break something if i use the constructor in despite of the common usage of RoleManager for creating roles. Is it possible to inject and use the RoleManager within the entity configuration?
@CodeMaze
@CodeMaze 4 ай бұрын
Hi. Thanks for the kind words. To be honest, I never dived deep into the implementation - I love the abstraction as is :) It is a service, and can be injected as a service inside any class. Now, I didn't need it inside the entity configuration class, so you have to try that.
@philipquarles4679
@philipquarles4679 5 ай бұрын
I am using VS 2022. I opened the PMC and entered: "Add-migration IdentityRoles" . The PMC displayed the following error: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AspNetUserRoles_AspNetUsers_UserId". The conflict occurred in database "IdentityYT", table "dbo.AspNetUsers", column 'Id'. The statement has been terminated. I inspected the ASP tables created by the migration. The AspRoles table has two roles (Visitor and Admin). None of the other ASP tables have any data. What am I missing? Thank you for your help
@CodeMaze
@CodeMaze 5 ай бұрын
I am not sure, but based on the error message it means that you have users with different Ids, maybe in migratin files, and EF Core can't refernce those tables using FKs. Probably the UserRolePopulated migration file is trying to insert different user ids. Maybe, as you said, you don't have any users created, so you need to create one and use the id inside the UserROlePOpulated migration script. This is my solution based on the migration scripts I provided with the source code.
Policy-based Authorization in ASP.Net Core (with Custom Authorization Handler)
19:37
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
The Right Way To Build Async APIs in ASP.NET Core
20:12
Milan Jovanović
Рет қаралды 23 М.
Authorization using Roles with Blazor & Identity in .NET 8 🔐
17:45
Implementing API Gateway With Ocelot in ASP.NET Core
13:26
Code Maze
Рет қаралды 7 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 103 М.
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 113 М.
Master Refresh Tokens in ASP.NET Core (building from scratch)
17:19
Milan Jovanović
Рет қаралды 11 М.
Implementing JWT Authentication in ASP.NET Core
23:51
Nick Chapsas
Рет қаралды 46 М.
The TRUTH About Golang Backend Frameworks
6:31
Melkey
Рет қаралды 134 М.