Working with Asp.Net Identity allow you to add the claims to a user. And the System.Security.Claims.ClaimTypes allows you to select any ClaimType from various ClaimTypes.
ClaimTypes is a static class and defines constants for well-known claim types that can be assigned to subjects.
I want to store all these claims in a List<> and display them in a ListBox so that the user with the Admin role can assign a ClaimType to a user after registration.
Seems that I can do that as ClaimTypes is a static class and those constants defined in that can't be listed.
You can list out the claim types by reflecting on the fields in the class:
For each
claimType
in the list, you can useclaimType.Name
to get the constant name andclaimType.GetValue(null)
to get the constant value.