Role-Based Authorization With Keycloak, ASP.NET Core Web API and Blazor WASM
Code Maze
0:00 / 0:00
Role-Based Authorization With Keycloak, ASP.NET Core Web API and Blazor WASM
6 211 просмотров · 1 г. назад
Code Maze
18,1 тыс. подписчиков
6 211 просмотров · 1 г. назад
►► Check out our courses: https://bit.ly/cdmz-courses
►► Support us on Patreon and get the source code: / codemaze
Hi, I'm Marinko Spasojevic, and in this video, I will continue working with Keycloak, Blazor WebAssembly, and .NET Web API. This time, I will focus on implementing role-based access control.
I will show you how to assign roles in Keycloak and use them to control access in both the API and the Blazor app. Proper role management is essential for securing your application, so stay tuned to learn how to do it the right way!
If this video is helpful please don’t forget to hit the like and subscribe buttons to help me and the channel as well.
LINKS MENTIONED IN THE VIDEO
►► Keycloak Authentication - • Keycloak Authentication With ASP.NET Core ...
FOLLOW US ON SOCIAL MEDIA!
►► / marinko-spasojevic
►► / codemazeblog
►► / codemazeblog
⏱️ Chapters
0:00 Role-based access control with Keycloak
0:43 Creating realm roles and assigning them
2:04 Default roles for newly registered users
2:48 Registering a user and inspecting the token
4:00 Mapping the role claim in Keycloak
4:49 Configuring RoleClaim in the Blazor app
5:31 Protecting the page and hiding the nav menu
6:30 A custom claims principal factory for array roles
9:47 Registering the factory and testing both roles