Role based tokens ASP.net Identity
问题 I am using the standard ASP.net OWIN OAuth middleware system to authenticate local users with Bearer tokens. What I would like to do is is hand out role-based tokens for the same user account. eg. OAuth TokenA => General User Privileges UserA -> OAuth TokenB => Admin User Privileges Is this supported in any way? 回答1: I was able to solve this using the following method - //ensure the token is a User role token only identity.AddClaim(new Claim(ClaimTypes.Role, "User")); Where 'identity' is an