After searching long time, finally found a video on Roles, Claim & Policy. I have an assignment that Roles must be dynamic, means that in [Authorize(Roles = "Admin")] must not be constant, it can vary and dynamic (could be changed on runtime rather than putting hardcoded). How can I achieve this, can you guide me or make a video on this? I would be very thankful.
First of all thanks for the great tutorials If i want to use an API Controller that inherits from ControllerBase and in order to gain access to ClaimsPrinciple's specific claim value in that case I need to use IHttpContextAccessor. Is that correct or I should use a different approach?
The term claims means pieces of information about a particular entity. The table 'UserClaims' will be used for storing user claims. while the 'RoleClaims' table will store claims related to roles. These tables are not used in JWT authentication but could be used in cookie-based authentication.
goo.gl/bPcyXW : Buy me a Coffee
bit.ly/4cfxLpk : Prev. Video (Organize Program.cs File)
bit.ly/4f0tOY5 : Part 1 (User Registration)
bit.ly/403lUVC : AspNet MVC with Identity Core
bit.ly/47yygKq : (Angular & .Net Core API) Tutorials
bit.ly/4fSmgXP : (React & .Net Core API) Tutorials
bit.ly/30fPDMg : AspNet Core MVC Tutorials
I followed your four videos, and they are awesome! I've never seen this level of content and explanation before. Thank you so much! Love from Nepal ❤
Really glad you found it helpful! and thanks for the feedback.
The same is combined an Angular front-end; you could see the entire playlist here : th-cam.com/video/DHoK29t9xjs/w-d-xo.html
watched all the 4 videos in the series and coded along now i have a fully functional Identity API, thanks so much 🙏
Thanks for watching the series, and I appreciate the time to write your wonderful feedback.
It is a great 4-part tutorial. Many thanks.
Thank you.
Very good tutorial, I really appreciate all these relevant explanations.
Glad you found it helpful.
❤
After searching long time, finally found a video on Roles, Claim & Policy. I have an assignment that Roles must be dynamic, means that in [Authorize(Roles = "Admin")] must not be constant, it can vary and dynamic (could be changed on runtime rather than putting hardcoded).
How can I achieve this, can you guide me or make a video on this?
I would be very thankful.
Thanks for the feedback, I've actually seen an msdn article on the topic, let me check what I can do.
First of all thanks for the great tutorials
If i want to use an API Controller that inherits from ControllerBase and in order to gain access to ClaimsPrinciple's specific claim value in that case I need to use IHttpContextAccessor. Is that correct or I should use a different approach?
Yes, you are correct.
Sample code : learn.microsoft.com/en-us/answers/questions/1143595/asp-net-core-web-api-how-to-use-user-claims-in-ser
@@CodAffection Thank you very much for your response
can you please explain the use of claim tables? when do we need them ?
The term claims means pieces of information about a particular entity.
The table 'UserClaims' will be used for storing user claims.
while the 'RoleClaims' table will store claims related to roles.
These tables are not used in JWT authentication but could be used in cookie-based authentication.
@@CodAffection can you also make a video on using claims table as well ?