2 types derived from ClaimsIdentity
System.Security.Claims (1)
System\Security\Claims\GenericIdentity.cs (1)
9public class GenericIdentity : ClaimsIdentity
System.Security.Principal.Windows (1)
System\Security\Principal\WindowsIdentity.cs (1)
35public class WindowsIdentity : ClaimsIdentity, IDisposable, ISerializable, IDeserializationCallback
40 instantiations of ClaimsIdentity
Aspire.Dashboard (9)
Api\ApiAuthenticationHandler.cs (3)
42var id = new ClaimsIdentity([new Claim(ClaimName, bool.TrueString)], AuthenticationScheme); 75var id = new ClaimsIdentity([new Claim(ClaimName, bool.TrueString)], AuthenticationScheme); 83var id = new ClaimsIdentity([new Claim(ClaimName, bool.TrueString)], AuthenticationScheme);
Authentication\AspirePolicyEvaluator.cs (1)
76context.User = new ClaimsPrincipal(new ClaimsIdentity());
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
36var id = new ClaimsIdentity([new Claim(OtlpAuthorization.OtlpClaimName, bool.TrueString)]);
Authentication\UnsecuredAuthenticationHandler.cs (1)
20var id = new ClaimsIdentity(
DashboardWebApplication.cs (1)
778context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
Mcp\McpCompositeAuthenticationHandler.cs (1)
34var id = new ClaimsIdentity([new Claim(McpApiKeyAuthenticationHandler.McpClaimName, bool.TrueString)]);
Model\ValidateTokenMiddleware.cs (1)
93var claimsIdentity = new ClaimsIdentity(
Aspire.Dashboard.Tests (7)
DashboardOptionsTests.cs (7)
323var claimIdentity = new ClaimsIdentity(); 351var claimIdentity = new ClaimsIdentity(); 380var claimIdentity = new ClaimsIdentity( 388var emptyClaimIdentity = new ClaimsIdentity(); 418var claimIdentity = new ClaimsIdentity( 426var emptyClaimIdentity = new ClaimsIdentity(); 455var claimIdentity = new ClaimsIdentity();
Aspire.Hosting (1)
Dashboard\DashboardServiceAuth.cs (1)
60principal: new ClaimsPrincipal(new ClaimsIdentity(
Microsoft.AspNetCore.Authentication (1)
TicketSerializer.cs (1)
205var identity = new ClaimsIdentity(authenticationType, nameClaimType, roleClaimType);
Microsoft.AspNetCore.Authentication.Cookies (2)
CookieAuthenticationHandler.cs (2)
266new ClaimsIdentity( 350new ClaimsIdentity(
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
146var identity = new ClaimsIdentity(ClaimsIssuer);
Microsoft.AspNetCore.Authorization.Policy (1)
PolicyEvaluator.cs (1)
65context.User = new ClaimsPrincipal(new ClaimsIdentity());
Microsoft.AspNetCore.Components.Server (1)
Circuits\RevalidatingServerAuthenticationStateProvider.cs (1)
104var anonymousUser = new ClaimsPrincipal(new ClaimsIdentity());
Microsoft.AspNetCore.Http (1)
DefaultHttpContext.cs (1)
161user = new ClaimsPrincipal(new ClaimsIdentity());
Microsoft.AspNetCore.Identity (3)
SignInManager.cs (3)
704var claimsIdentity = new ClaimsIdentity(IdentityConstants.TwoFactorUserIdScheme); 1179var identity = new ClaimsIdentity(IdentityConstants.TwoFactorUserIdScheme); 1191var rememberBrowserIdentity = new ClaimsIdentity(IdentityConstants.TwoFactorRememberMeScheme);
Microsoft.Extensions.Identity.Core (1)
UserClaimsPrincipalFactory.cs (1)
75var id = new ClaimsIdentity("Identity.Application", // REVIEW: Used to match Application scheme
System.Security.Claims (12)
System\Security\Claims\ClaimsIdentity.cs (8)
64/// <remarks><seealso cref="ClaimsIdentity(IIdentity, IEnumerable{Claim}, string, string, string)"/> for details on how internal values are set.</remarks> 75/// <remarks><seealso cref="ClaimsIdentity(IIdentity, IEnumerable{Claim}, string, string, string)"/> for details on how internal values are set.</remarks> 96/// <remarks><seealso cref="ClaimsIdentity(IIdentity, IEnumerable{Claim}, string, string, string)"/> for details on how internal values are set.</remarks> 107/// <remarks><seealso cref="ClaimsIdentity(IIdentity, IEnumerable{Claim}, string, string, string)"/> for details on how internal values are set.</remarks> 119/// <remarks><seealso cref="ClaimsIdentity(IIdentity, IEnumerable{Claim}, string, string, string)"/> for details on how internal values are set.</remarks> 132/// <remarks><seealso cref="ClaimsIdentity(IIdentity, IEnumerable{Claim}, string, string, string)"/> for details on how internal values are set.</remarks> 458return new ClaimsIdentity(this, _stringComparison); 820_actor = new ClaimsIdentity(reader);
System\Security\Claims\ClaimsPrincipal.cs (3)
121_identities.Add(new ClaimsIdentity(identity)); 141_identities.Add(new ClaimsIdentity(principal.Identity)); 259return new ClaimsIdentity(reader);
System\Security\Claims\GenericPrincipal.cs (1)
43claimsIdentity = new ClaimsIdentity(identity);
236 references to ClaimsIdentity
Aspire.Dashboard (13)
Api\ApiAuthenticationHandler.cs (3)
42var id = new ClaimsIdentity([new Claim(ClaimName, bool.TrueString)], AuthenticationScheme); 75var id = new ClaimsIdentity([new Claim(ClaimName, bool.TrueString)], AuthenticationScheme); 83var id = new ClaimsIdentity([new Claim(ClaimName, bool.TrueString)], AuthenticationScheme);
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
36var id = new ClaimsIdentity([new Claim(OtlpAuthorization.OtlpClaimName, bool.TrueString)]);
Authentication\UnsecuredAuthenticationHandler.cs (1)
20var id = new ClaimsIdentity(
Components\Controls\UserProfile.razor.cs (2)
46var claimsIdentity = authState.User.Identity as ClaimsIdentity;
DashboardWebApplication.cs (2)
853var claimsIdentity = (ClaimsIdentity)context.Principal!.Identity!;
Extensions\ClaimsIdentityExtensions.cs (2)
11/// Searches the claims in the <see cref="ClaimsIdentity.Claims"/> for each of the claim types in <paramref name="claimTypes" /> 14public static string? FindFirst(this ClaimsIdentity identity, string[] claimTypes)
Mcp\McpCompositeAuthenticationHandler.cs (1)
34var id = new ClaimsIdentity([new Claim(McpApiKeyAuthenticationHandler.McpClaimName, bool.TrueString)]);
Model\ValidateTokenMiddleware.cs (1)
93var claimsIdentity = new ClaimsIdentity(
Aspire.Dashboard.Tests (7)
DashboardOptionsTests.cs (7)
323var claimIdentity = new ClaimsIdentity(); 351var claimIdentity = new ClaimsIdentity(); 380var claimIdentity = new ClaimsIdentity( 388var emptyClaimIdentity = new ClaimsIdentity(); 418var claimIdentity = new ClaimsIdentity( 426var emptyClaimIdentity = new ClaimsIdentity(); 455var claimIdentity = new ClaimsIdentity();
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
562public override ClaimsIdentity Clone()
Microsoft.AspNetCore.Antiforgery (9)
Internal\DefaultAntiforgeryTokenGenerator.cs (6)
59var authenticatedIdentity = GetAuthenticatedIdentity(httpContext.User); 88authenticatedIdentity?.GetType() ?? typeof(ClaimsIdentity), 148var authenticatedIdentity = GetAuthenticatedIdentity(httpContext.User); 208private static ClaimsIdentity? GetAuthenticatedIdentity(ClaimsPrincipal? claimsPrincipal) 215if (claimsPrincipal.Identities is List<ClaimsIdentity> identitiesList) 227foreach (var identity in claimsPrincipal.Identities)
Internal\DefaultClaimUidExtractor.cs (3)
31public static List<string>? GetUniqueIdentifierParameters(IEnumerable<ClaimsIdentity> claimsIdentities) 33var identitiesList = claimsIdentities as List<ClaimsIdentity>; 41var identity = identitiesList[i];
Microsoft.AspNetCore.Authentication (19)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (2)
21/// <param name="existingPrincipal">The <see cref="ClaimsPrincipal"/> containing existing <see cref="ClaimsIdentity"/>.</param> 22/// <param name="additionalPrincipal">The <see cref="ClaimsPrincipal"/> containing <see cref="ClaimsIdentity"/> to be added.</param>
TicketSerializer.cs (17)
73foreach (var identity in principal.Identities) 85/// <param name="identity">The <see cref="ClaimsIdentity" />.</param> 86protected virtual void WriteIdentity(BinaryWriter writer, ClaimsIdentity identity) 94WriteWithDefault(writer, identity.NameClaimType, ClaimsIdentity.DefaultNameClaimType); 95WriteWithDefault(writer, identity.RoleClaimType, ClaimsIdentity.DefaultRoleClaimType); 137WriteWithDefault(writer, claim.Type, claim.Subject?.NameClaimType ?? ClaimsIdentity.DefaultNameClaimType); 140WriteWithDefault(writer, claim.Issuer, ClaimsIdentity.DefaultIssuer); 177var identities = new ClaimsIdentity[count]; 189/// Reads a <see cref="ClaimsIdentity"/> from a <see cref="BinaryReader"/>. 192/// <returns>The read <see cref="ClaimsIdentity"/>.</returns> 193protected virtual ClaimsIdentity ReadIdentity(BinaryReader reader) 198var nameClaimType = ReadWithDefault(reader, ClaimsIdentity.DefaultNameClaimType); 199var roleClaimType = ReadWithDefault(reader, ClaimsIdentity.DefaultRoleClaimType); 205var identity = new ClaimsIdentity(authenticationType, nameClaimType, roleClaimType); 235/// <param name="identity">The <see cref="ClaimsIdentity"/> to add the claim to.</param> 237protected virtual Claim ReadClaim(BinaryReader reader, ClaimsIdentity identity) 245var issuer = ReadWithDefault(reader, ClaimsIdentity.DefaultIssuer);
Microsoft.AspNetCore.Authentication.Abstractions (3)
AuthenticationOptions.cs (1)
95/// A user is considered authenticated if <see cref="ClaimsIdentity.IsAuthenticated"/> returns <see langword="true" /> for the <see cref="ClaimsPrincipal"/> associated with the HTTP request.
AuthenticationTicket.cs (2)
56/// The method clones the <see cref="Principal"/> by calling <see cref="ClaimsIdentity.Clone"/> on each of the <see cref="ClaimsPrincipal.Identities"/>. 62foreach (var identity in Principal.Identities)
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationHandler.cs (1)
136foreach (var identity in principal.Identities)
Microsoft.AspNetCore.Authentication.OAuth (14)
ClaimAction.cs (1)
42public abstract void Run(JsonElement userData, ClaimsIdentity identity, string issuer);
CustomJsonClaimAction.cs (1)
32public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer)
DeleteClaimAction.cs (1)
25public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer)
Events\OAuthCreatingTicketContext.cs (3)
13/// Contains information about the login session as well as the user <see cref="System.Security.Claims.ClaimsIdentity"/>. 101public ClaimsIdentity? Identity => Principal?.Identity as ClaimsIdentity;
Events\OAuthEvents.cs (1)
28/// <param name="context">Contains information about the login session as well as the user <see cref="System.Security.Claims.ClaimsIdentity"/>.</param>
JsonKeyClaimAction.cs (2)
33public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer) 56private protected void AddClaim(string value, ClaimsIdentity identity, string issuer)
JsonSubKeyClaimAction.cs (1)
35public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer)
MapAllClaimsAction.cs (1)
23public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer)
OAuthHandler.cs (3)
146var identity = new ClaimsIdentity(ClaimsIssuer); 248/// <param name="identity">The <see cref="ClaimsIdentity"/>.</param> 252protected virtual async Task<AuthenticationTicket> CreateTicketAsync(ClaimsIdentity identity, AuthenticationProperties properties, OAuthTokenResponse tokens)
Microsoft.AspNetCore.Authorization (1)
NameAuthorizationRequirement.cs (1)
44foreach (var identity in context.User.Identities)
Microsoft.AspNetCore.Authorization.Policy (2)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (2)
21/// <param name="existingPrincipal">The <see cref="ClaimsPrincipal"/> containing existing <see cref="ClaimsIdentity"/>.</param> 22/// <param name="additionalPrincipal">The <see cref="ClaimsPrincipal"/> containing <see cref="ClaimsIdentity"/> to be added.</param>
Microsoft.AspNetCore.Components.Authorization (3)
AuthenticationStateData.cs (3)
19/// Gets the value that identifies 'Name' claims. This is used when returning the property <see cref="ClaimsIdentity.Name"/>. 21public string NameClaimType { get; set; } = ClaimsIdentity.DefaultNameClaimType; 26public string RoleClaimType { get; set; } = ClaimsIdentity.DefaultRoleClaimType;
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionContext.cs (1)
282foreach (var identity in User.Identities)
Internal\HttpConnectionDispatcher.cs (1)
698foreach (var identity in oldContext.User.Identities)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (2)
21/// <param name="existingPrincipal">The <see cref="ClaimsPrincipal"/> containing existing <see cref="ClaimsIdentity"/>.</param> 22/// <param name="additionalPrincipal">The <see cref="ClaimsPrincipal"/> containing <see cref="ClaimsIdentity"/> to be added.</param>
Microsoft.AspNetCore.Identity (3)
SignInManager.cs (3)
704var claimsIdentity = new ClaimsIdentity(IdentityConstants.TwoFactorUserIdScheme); 1179var identity = new ClaimsIdentity(IdentityConstants.TwoFactorUserIdScheme); 1191var rememberBrowserIdentity = new ClaimsIdentity(IdentityConstants.TwoFactorRememberMeScheme);
Microsoft.AspNetCore.Mvc.Core (2)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (2)
21/// <param name="existingPrincipal">The <see cref="ClaimsPrincipal"/> containing existing <see cref="ClaimsIdentity"/>.</param> 22/// <param name="additionalPrincipal">The <see cref="ClaimsPrincipal"/> containing <see cref="ClaimsIdentity"/> to be added.</param>
Microsoft.Extensions.Identity.Core (10)
UserClaimsPrincipalFactory.cs (9)
62var id = await GenerateClaimsAsync(user).ConfigureAwait(false); 69/// <param name="user">The user to create a <see cref="ClaimsIdentity"/> from.</param> 70/// <returns>The <see cref="Task"/> that represents the asynchronous creation operation, containing the created <see cref="ClaimsIdentity"/>.</returns> 71protected virtual async Task<ClaimsIdentity> GenerateClaimsAsync(TUser user) 75var id = new ClaimsIdentity("Identity.Application", // REVIEW: Used to match Application scheme 134/// <param name="user">The user to create a <see cref="ClaimsIdentity"/> from.</param> 135/// <returns>The <see cref="Task"/> that represents the asynchronous creation operation, containing the created <see cref="ClaimsIdentity"/>.</returns> 136protected override async Task<ClaimsIdentity> GenerateClaimsAsync(TUser user) 138var id = await base.GenerateClaimsAsync(user).ConfigureAwait(false);
UserManager.cs (1)
430/// <remarks>The Name claim is identified by <see cref="ClaimsIdentity.DefaultNameClaimType"/>.</remarks>
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
852[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimsIdentity))]
netstandard (1)
netstandard.cs (1)
1836[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimsIdentity))]
System.Security.Claims (138)
System\Security\Claims\Claim.cs (42)
36private readonly ClaimsIdentity? _subject; 57/// <param name="subject"> the value for <see cref="Claim.Subject"/>, which is the <see cref="ClaimsIdentity"/> that has these claims.</param> 59public Claim(BinaryReader reader, ClaimsIdentity? subject) 72_type = ClaimsIdentity.DefaultNameClaimType; 76_type = ClaimsIdentity.DefaultRoleClaimType; 101_issuer = ClaimsIdentity.DefaultIssuer; 115_originalIssuer = ClaimsIdentity.DefaultIssuer; 148/// <see cref="Claim.Issuer"/> is set to <see cref="ClaimsIdentity.DefaultIssuer"/>, 150/// <see cref="Claim.OriginalIssuer"/> is set to <see cref="ClaimsIdentity.DefaultIssuer"/>, and 153/// <seealso cref="ClaimsIdentity"/> 157: this(type, value, ClaimValueTypes.String, ClaimsIdentity.DefaultIssuer, ClaimsIdentity.DefaultIssuer, (ClaimsIdentity?)null) 169/// <see cref="Claim.Issuer"/> is set to <see cref="ClaimsIdentity.DefaultIssuer"/>, 170/// <see cref="Claim.OriginalIssuer"/> is set to <see cref="ClaimsIdentity.DefaultIssuer"/>, 173/// <seealso cref="ClaimsIdentity"/> 177: this(type, value, valueType, ClaimsIdentity.DefaultIssuer, ClaimsIdentity.DefaultIssuer, (ClaimsIdentity?)null) 187/// <param name="issuer">The claim issuer. If this parameter is empty or null, then <see cref="ClaimsIdentity.DefaultIssuer"/> is used.</param> 193/// <seealso cref="ClaimsIdentity"/> 197: this(type, value, valueType, issuer, issuer, (ClaimsIdentity?)null) 207/// <param name="issuer">The claim issuer. If this parameter is empty or null, then <see cref="ClaimsIdentity.DefaultIssuer"/> is used.</param> 213/// <seealso cref="ClaimsIdentity"/> 217: this(type, value, valueType, issuer, originalIssuer, (ClaimsIdentity?)null) 227/// <param name="issuer">The claim issuer. If this parameter is empty or null, then <see cref="ClaimsIdentity.DefaultIssuer"/> is used.</param> 231/// <seealso cref="ClaimsIdentity"/> 234public Claim(string type, string value, string? valueType, string? issuer, string? originalIssuer, ClaimsIdentity? subject) 246/// <param name="issuer">The claim issuer. If this parameter is empty or null, then <see cref="ClaimsIdentity.DefaultIssuer"/> is used.</param> 251internal Claim(string type, string value, string? valueType, string? issuer, string? originalIssuer, ClaimsIdentity? subject, string? propertyKey, string? propertyValue) 259_issuer = string.IsNullOrEmpty(issuer) ? ClaimsIdentity.DefaultIssuer : issuer; 277: this(other, (other == null ? (ClaimsIdentity?)null : other._subject)) 285/// <param name="subject">the <see cref="ClaimsIdentity"/> to assign to <see cref="Claim.Subject"/>.</param> 288protected Claim(Claim other, ClaimsIdentity? subject) 349public ClaimsIdentity? Subject 385return Clone((ClaimsIdentity?)null); 391/// <param name="identity">the value for <see cref="Claim.Subject"/>, which is the <see cref="ClaimsIdentity"/> that has these claims.</param> 393public virtual Claim Clone(ClaimsIdentity? identity) 420if (string.Equals(_type, ClaimsIdentity.DefaultNameClaimType)) 424else if (string.Equals(_type, ClaimsIdentity.DefaultRoleClaimType)) 439if (!string.Equals(_issuer, ClaimsIdentity.DefaultIssuer, StringComparison.Ordinal)) 449else if (!string.Equals(_originalIssuer, ClaimsIdentity.DefaultIssuer))
System\Security\Claims\ClaimsIdentity.cs (51)
33private ClaimsIdentity? _actor; 53/// Initializes an instance of <see cref="ClaimsIdentity"/>. 61/// Initializes an instance of <see cref="ClaimsIdentity"/>. 71/// Initializes an instance of <see cref="ClaimsIdentity"/>. 83/// Initializes an instance of <see cref="ClaimsIdentity"/>. 92/// Initializes an instance of <see cref="ClaimsIdentity"/>. 103/// Initializes an instance of <see cref="ClaimsIdentity"/>. 114/// Initializes an instance of <see cref="ClaimsIdentity"/>. 117/// <param name="nameType">The <see cref="Claim.Type"/> used when obtaining the value of <see cref="ClaimsIdentity.Name"/>.</param> 126/// Initializes an instance of <see cref="ClaimsIdentity"/>. 130/// <param name="nameType">The <see cref="Claim.Type"/> used when obtaining the value of <see cref="ClaimsIdentity.Name"/>.</param> 139/// Initializes an instance of <see cref="ClaimsIdentity"/>. 144/// <param name="nameType">The <see cref="Claim.Type"/> used when obtaining the value of <see cref="ClaimsIdentity.Name"/>.</param> 146/// <remarks>If 'identity' is a <see cref="ClaimsIdentity"/>, then there are potentially multiple sources for AuthenticationType, NameClaimType, RoleClaimType. 151/// <exception cref="InvalidOperationException">if 'identity' is a <see cref="ClaimsIdentity"/> and <see cref="ClaimsIdentity.Actor"/> results in a circular reference back to 'this'.</exception> 154ClaimsIdentity? claimsIdentity = identity as ClaimsIdentity; 197/// Initializes an instance of <see cref="ClaimsIdentity"/> using a <see cref="BinaryReader"/>. 200/// <param name="reader">a <see cref="BinaryReader"/> pointing to a <see cref="ClaimsIdentity"/>.</param> 210/// Initializes an instance of <see cref="ClaimsIdentity" /> with the specified <see cref="BinaryReader" />. 212/// <param name="reader">A <see cref="BinaryReader" /> pointing to a <see cref="ClaimsIdentity" />.</param> 232/// <param name="other"><see cref="ClaimsIdentity"/> to copy.</param> 234protected ClaimsIdentity(ClaimsIdentity other) 241/// Initializes a new instance of the <see cref="ClaimsIdentity" /> class from an existing 242/// <see cref="ClaimsIdentity" /> instance. 244/// <param name="other">The <see cref="ClaimsIdentity" /> to copy.</param> 252protected ClaimsIdentity(ClaimsIdentity other, StringComparison stringComparison) 261/// Initializes a new instance of the <see cref="ClaimsIdentity" /> class. 273/// <paramref name="identity"/> is a <see cref="ClaimsIdentity"/> and <see cref="Actor" /> 297/// Initializes an instance of <see cref="ClaimsIdentity"/> from a serialized stream created via 312/// Gets the authentication type that can be used to determine how this <see cref="ClaimsIdentity"/> authenticated to an authority. 328/// Gets or sets a <see cref="ClaimsIdentity"/> that was granted delegation rights. 331public ClaimsIdentity? Actor 348/// Gets or sets a context that was used to create this <see cref="ClaimsIdentity"/>. 357/// Gets the claims as <see cref="IEnumerable{Claim}"/>, associated with this <see cref="ClaimsIdentity"/>. 404/// Allow the association of claims with this instance of <see cref="ClaimsIdentity"/>. 405/// The claims will not be serialized or added in Clone(). They will be included in searches, finds and returned from the call to <see cref="ClaimsIdentity.Claims"/>. 410/// Gets or sets the label for this <see cref="ClaimsIdentity"/> 419/// Gets the Name of this <see cref="ClaimsIdentity"/>. 438/// Gets the value that identifies 'Name' claims. This is used when returning the property <see cref="ClaimsIdentity.Name"/>. 454/// Creates a new instance of <see cref="ClaimsIdentity"/> with values copied from this object. 456public virtual ClaimsIdentity Clone() 736private void Initialize(ClaimsIdentity other) 760/// <param name="reader">a <see cref="BinaryReader"/> pointing to a <see cref="ClaimsIdentity"/>.</param> 789_nameClaimType = ClaimsIdentity.DefaultNameClaimType; 799_roleClaimType = ClaimsIdentity.DefaultRoleClaimType; 886if (!string.Equals(_nameClaimType, ClaimsIdentity.DefaultNameClaimType, StringComparison.Ordinal)) 892if (!string.Equals(_roleClaimType, ClaimsIdentity.DefaultRoleClaimType, StringComparison.Ordinal)) 977private bool IsCircular(ClaimsIdentity subject) 984ClaimsIdentity currSubject = subject;
System\Security\Claims\ClaimsPrincipal.cs (39)
27private readonly List<ClaimsIdentity> _identities = new List<ClaimsIdentity>(); 30private static Func<IEnumerable<ClaimsIdentity>, ClaimsIdentity?> s_identitySelector = SelectPrimaryIdentity; 60private static ClaimsIdentity? SelectPrimaryIdentity(IEnumerable<ClaimsIdentity> identities) 64foreach (ClaimsIdentity identity in identities) 75public static Func<IEnumerable<ClaimsIdentity>, ClaimsIdentity?> PrimaryIdentitySelector 99public ClaimsPrincipal(IEnumerable<ClaimsIdentity> identities) 115if (identity is ClaimsIdentity ci) 190/// Adds a single <see cref="ClaimsIdentity"/> to an internal list. 192/// <param name="identity">the <see cref="ClaimsIdentity"/>add.</param> 194public virtual void AddIdentity(ClaimsIdentity identity) 206public virtual void AddIdentities(IEnumerable<ClaimsIdentity> identities) 220foreach (ClaimsIdentity identity in Identities) 250/// Provides an extensibility point for derived types to create a custom <see cref="ClaimsIdentity"/>. 254/// <returns>a new <see cref="ClaimsIdentity"/>.</returns> 255protected virtual ClaimsIdentity CreateClaimsIdentity(BinaryReader reader) 279/// <remarks>Each <see cref="ClaimsIdentity"/> is called. <seealso cref="ClaimsIdentity.FindAll(string)"/>.</remarks> 288foreach (ClaimsIdentity identity in Identities) 306/// <remarks>Each <see cref="ClaimsIdentity"/> is called. <seealso cref="ClaimsIdentity.FindAll(Predicate{Claim})"/>.</remarks> 315foreach (ClaimsIdentity identity in Identities) 333/// <remarks>Each <see cref="ClaimsIdentity"/> is called. <seealso cref="ClaimsIdentity.FindFirst(string)"/>.</remarks> 341foreach (ClaimsIdentity identity in Identities) 361/// <remarks>Each <see cref="ClaimsIdentity"/> is called. <seealso cref="ClaimsIdentity.FindFirst(Predicate{Claim})"/>.</remarks> 389/// <remarks>Each <see cref="ClaimsIdentity"/> is called. <seealso cref="ClaimsIdentity.HasClaim(string, string)"/>.</remarks> 415/// <remarks>Each <see cref="ClaimsIdentity"/> is called. <seealso cref="ClaimsIdentity.HasClaim(Predicate{Claim})"/>.</remarks> 438/// Collection of <see cref="ClaimsIdentity" /> 440public virtual IEnumerable<ClaimsIdentity> Identities 527foreach (var identity in _identities) 565foreach (ClaimsIdentity items in Identities) 571if (identitiesCount == 1 && Identity is ClaimsIdentity claimsIdentity)
System\Security\Claims\GenericIdentity.cs (3)
45public override ClaimsIdentity Clone() 86base.AddClaim(new Claim(base.NameClaimType, m_name, ClaimValueTypes.String, ClaimsIdentity.DefaultIssuer, ClaimsIdentity.DefaultIssuer, this));
System\Security\Claims\GenericPrincipal.cs (3)
37if (identity is ClaimsIdentity claimsIdentity) 55roleClaims.Add(new Claim(claimsIdentity.RoleClaimType, role, ClaimValueTypes.String, ClaimsIdentity.DefaultIssuer, ClaimsIdentity.DefaultIssuer, claimsIdentity));
System.Security.Principal.Windows (3)
System\Security\Principal\WindowsIdentity.cs (1)
973public override ClaimsIdentity Clone()
System\Security\Principal\WindowsPrincipal.cs (2)
80foreach (ClaimsIdentity identity in Identities) 101foreach (ClaimsIdentity identity in Identities)
System.ServiceModel.Primitives (1)
System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
608public override ClaimsIdentity Clone()