I want use User.IsInRole() function in my api controller. I have Identity user ,how could I convert it to ClaimsPrincipal or use User.IsInRole() with Identity user ?!?!?!
CodePudding user response:
You can use SignInManager<TUser>.CreateUserPrincipalAsync(TUser)
method.