let me correct if the question is inappropriate or not relevant.
I have created Dot net core applications separately using Identity. Separately for Repository pattern. Now tried to create roles dynamically by combining both Identity and Repository pattern.
In detail: I want to create an API application with following components included.
- Identity
- Manage roles dynamically (store roles in AspNetRoles, Role names should not be hard-coded or should not have enum classes inside the application)
- User/Role claims.
- To develop an Dot Net API by creating Roles, Menus dynamically.
- To load Navigation menu from database according to the JWT token and User/Roles claims.
- Restrict the user to access particular action in API controller based on Claims.
I am confused to how to start and implement dynamic Roles, claims in .NET core API.
Normally, we will create customized models for Roles, Users, Menus. Then fetch the menu navigation items according to role assigned the user. But in .Net core with Identity, I could not figure out the exact way to achieve this.