Add the ability for getting users having a type of claim
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
The UserManager exposes the method GetUsersForClaimAsync(Claim claim).
This method takes a claim and returns a list of users with that claim.
Sometimes it is needed to find all users by a specific claim type, ignoring the value.
A method like GetUsersForClaimTypeAsync(string claimType) would be great.
It would need to be added to the IUserClaimStore interface, and thus the UserStore(s) too.
Doing this by inheritance is a pain since the UserClaims property is private.
Otherwise a slightly modified query as from the GetUsersForClaimAsync is all that is needed, where claimType is a string.
` var query = from userclaims in UserClaims
join user in Users on userclaims.UserId equals user.Id
where userclaims.ClaimType == claimType
select user;`
Contributor guide
Assessment
This issue has not been assessed yet.