32 references to FindFirstValue
Identity.ExternalClaims (1)
Pages\Account\ExternalLogin.cshtml.cs (1)
102Email = info.Principal.FindFirstValue(ClaimTypes.Email)
IdentitySample.Mvc (1)
Controllers\AccountController.cs (1)
191var email = info.Principal.FindFirstValue(ClaimTypes.Email);
Microsoft.AspNetCore.Identity (11)
SignInManager.cs (11)
325if (await ValidateSecurityStampAsync(user, principal.FindFirstValue(Options.ClaimsIdentity.SecurityStampClaimType))) 348if (await ValidateSecurityStampAsync(user, principal.FindFirstValue(Options.ClaimsIdentity.SecurityStampClaimType))) 772if (result.Principal.FindFirstValue(ClaimTypes.NameIdentifier) is not { Length: > 0 } userId || 773result.Principal.FindFirstValue(ClaimTypes.Email) is not { Length: > 0 } userName || 774result.Principal.FindFirstValue(ClaimTypes.Name) is not { Length: > 0 } userDisplayName) 810var userId = result.Principal.FindFirstValue(ClaimTypes.NameIdentifier); 833return (result?.Principal != null && result.Principal.FindFirstValue(ClaimTypes.Name) == userId); 1098var providerKey = auth.Principal.FindFirstValue(ClaimTypes.NameIdentifier) ?? auth.Principal.FindFirstValue("sub"); 1265var userId = result.Principal.FindFirstValue(ClaimTypes.Name); 1280LoginProvider = result.Principal.FindFirstValue(ClaimTypes.AuthenticationMethod),
Microsoft.AspNetCore.Identity.FunctionalTests (1)
RegistrationTests.cs (1)
231authenticationMethod = user.FindFirstValue(ClaimTypes.AuthenticationMethod), IdentityConstants.ApplicationScheme);
Microsoft.AspNetCore.Identity.Test (14)
PrincipalExtensionsTest.cs (1)
16Assert.Null(id.FindFirstValue("bogus"));
SignInManagerTest.cs (13)
302It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 346It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 431It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 585It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.AuthenticationMethod) == loginProvider 586&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 780It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.AuthenticationMethod) == loginProvider 781&& i.FindFirstValue("amr") == "mfa" 782&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 797It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 861It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 1082(userId == null || id.FindFirstValue(ClaimTypes.NameIdentifier) == userId) && 1083(loginProvider == null || id.FindFirstValue(ClaimTypes.AuthenticationMethod) == loginProvider) && 1084(amr == null || id.FindFirstValue("amr") == amr)),
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
163Email = info.Principal.FindFirstValue(ClaimTypes.Email)!
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
163Email = info.Principal.FindFirstValue(ClaimTypes.Email)!
Microsoft.Extensions.Identity.Core (2)
UserManager.cs (2)
425return principal.FindFirstValue(Options.ClaimsIdentity.UserNameClaimType); 437return principal.FindFirstValue(Options.ClaimsIdentity.UserIdClaimType);