Setting ClaimTypes.Name does not result in .name identifier
I am playing with the requested permission in .net 4.5. It works really well. But I have a promising problem.
I thought username must be specified to set claim type to name
I have verified that ident.NameClaimType has the same meaning as ClaimTypes.Name Both are http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
I have set a new requirement. Which I can see is part of the identity requirements. but Identity.Name is still empty.
what am I doing wrong?
ClaimsIdentity ident = (ClaimsIdentity)incomingPrincipal.Identity;
ident.AddClaim(new Claim(ClaimTypes.Name, resourceName));
+3
source to share