what are the URLs for in claim-types

These are ClaimTypes, which represents the pre-defined types of claims that an entity can claim. The ones you mention are from WIF, here are the IdentityModel ClaimTypes.

Known claimtypes are automatically deserialized into the context. Like http://schemas.microsoft.com/ws/2008/06/identity/claims/role is added as role to the user.roles collection (used for IsInRole).

So the types are not random, but by specification. You can add your own types. This can be any string, but you can also use the same format.

Suppose you add a CustomerId as claim, then you’ll need to query the Claims collection by claimtype="CustomerId", or the uri you defined (like http://schemas.mycompany.com/2017/06/identity/CustomerId).

You can add claims by code, or by inserting records in the Identity.Claims tables.

Leave a Comment