A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
JWT with authorization client side
Hello,
I have created web api server with jwt auth. In jwt I can get role claims for users. Roles are user, manager and admin.
My client is asp.net core MVC. So I have a layout page with menu items. We can use "@if(User.IsInRole("Admin"))" to hide/show menu items in web app without consuming api.. My question is how can I make menu items show and hide based on user role from jwt consuming api and what is the best practice for this (action or auth filters, middle ware etc.).
Developer technologies | ASP.NET Core | Other
1 answer
Sort by: Oldest
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more