76 references to Identities
Aspire.Dashboard (2)
Authentication\AspirePolicyEvaluator.cs (2)
139newPrincipal.AddIdentities(additionalPrincipal.Identities); 145newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any()));
Microsoft.AspNetCore.Antiforgery (6)
Internal\DefaultAntiforgeryTokenGenerator.cs (2)
230if (claimsPrincipal.Identities is List<ClaimsIdentity> identitiesList) 242foreach (var identity in claimsPrincipal.Identities)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Authentication (6)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
TicketSerializer.cs (2)
71writer.Write(principal.Identities.Count()); 73foreach (var identity in principal.Identities)
Microsoft.AspNetCore.Authentication.Abstractions (2)
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)
137foreach (var identity in principal.Identities)
Microsoft.AspNetCore.Authorization (6)
ClaimsAuthorizationRequirement.cs (1)
62var identities = user.Identities;
NameAuthorizationRequirement.cs (1)
44foreach (var identity in context.User.Identities)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Authorization.Policy (4)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Components.Endpoints (4)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Components.Server (4)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
AuthenticationStateSerializationOptions.cs (1)
44if (authenticationState.User.Identities.FirstOrDefault() is { } identity)
Microsoft.AspNetCore.Http.Connections (12)
Internal\HttpConnectionContext.cs (5)
538foreach (var identity in user.Identities) 605foreach (var identity in user.Identities) 636return SequenceEqual(current.Identities, incoming.Identities, ClaimsIdentityContentEquals); 758foreach (var identity in user.Identities)
Internal\HttpConnectionDispatcher.cs (1)
1064return user?.Identities.Any(static identity => identity is WindowsIdentity) == true;
Internal\UserIdentitySnapshot.cs (2)
70foreach (var identity in user.Identities) 121foreach (var identity in user.Identities)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Identity (3)
SignInManager.cs (3)
143return principal.Identities != null && 144principal.Identities.Any(i => i.AuthenticationType == AuthenticationScheme); 293userPrincipal.Identities.First().AddClaim(claim);
Microsoft.AspNetCore.Mvc.Core (4)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.Mvc.TagHelpers (4)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.OutputCaching (4)
src\aspnetcore\src\Shared\SecurityHelper\SecurityHelper.cs (4)
61newPrincipal.AddIdentities(additionalPrincipal.Identities); 67newPrincipal.AddIdentities(existingPrincipal.Identities.Where(i => i.IsAuthenticated || i.Claims.Any())); 81=> user?.Identity is not null && user.Identities.Any(static identity => identity.IsAuthenticated); 97var principalIdentities = principal.Identities;
Microsoft.AspNetCore.SignalR.Core (3)
HubConnectionHandler.cs (3)
265return SequenceEqual(current.Identities, incoming.Identities, ClaimsIdentityContentEquals); 316=> user.Identities.Any(static identity => identity.IsAuthenticated);
System.Security.Claims (8)
System\Security\Claims\ClaimsPrincipal.cs (8)
145if (null != cp.Identities) 147_identities.AddRange(cp.Identities); 214/// Gets the claims as <see cref="IEnumerable{Claim}"/>, associated with this <see cref="ClaimsPrincipal"/> by enumerating all <see cref="Identities"/>. 220foreach (ClaimsIdentity identity in Identities) 288foreach (ClaimsIdentity identity in Identities) 315foreach (ClaimsIdentity identity in Identities) 341foreach (ClaimsIdentity identity in Identities) 565foreach (ClaimsIdentity items in Identities)
System.Security.Principal.Windows (2)
System\Security\Principal\WindowsPrincipal.cs (2)
80foreach (ClaimsIdentity identity in Identities) 101foreach (ClaimsIdentity identity in Identities)