ClaimsIdentity Constructor (IIdentity)
Initializes a new instance of the ClaimsIdentity class using the name and authentication type from the specified IIdentity.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- identity
-
Type:
System.Security.Principal.IIdentity
The identity from which to base the new claims identity.
The following table shows initial property values for an instance of the ClaimsIdentity class.
Property | Value | ||
|---|---|---|---|
If identity is assignable from ClaimsIdentity, the value of the identity.Actor property; otherwise, null. | |||
The value of the identity.AuthenticationType (IIdentity.AuthenticationType) property is used. | |||
If identity is assignable from ClaimsIdentity, the value of the identity.BootStrapContext property; otherwise, null. | |||
If identity is assignable from ClaimsIdentity, the claims from identity are added to the new instance; otherwise, an empty collection. | |||
| |||
If identity is assignable from ClaimsIdentity, the value of the identity.Label property; otherwise, null. | |||
If identity is not assignable from ClaimsIdentity, is not null, and has an IIdentity.Name property that is not null; a name claim is added to the new instance using the value of the IIdentity.Name property.
| |||
If identity is assignable from ClaimsIdentity, the value of the identity.NameClaimType property is used; otherwise, DefaultNameClaimType is used. | |||
If identity is assignable from ClaimsIdentity, the value of the identity.RoleClaimType property is used; otherwise, DefaultRoleClaimType is used. |
Available since 10
.NET Framework
Available since 4.5
