27 references to FindFirstValue
IdentitySample.Mvc (1)
Controllers\AccountController.cs (1)
191var email = info.Principal.FindFirstValue(ClaimTypes.Email);
Microsoft.AspNetCore.Identity (7)
SignInManager.cs (7)
342if (await ValidateSecurityStampAsync(user, principal.FindFirstValue(Options.ClaimsIdentity.SecurityStampClaimType))) 365if (await ValidateSecurityStampAsync(user, principal.FindFirstValue(Options.ClaimsIdentity.SecurityStampClaimType))) 752return (result?.Principal != null && result.Principal.FindFirstValue(ClaimTypes.Name) == userId); 1105var providerKey = auth.Principal.FindFirstValue(ClaimTypes.NameIdentifier) ?? auth.Principal.FindFirstValue("sub"); 1272var userId = result.Principal.FindFirstValue(ClaimTypes.Name); 1287LoginProvider = 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)
331It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 379It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 729It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 883It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.AuthenticationMethod) == loginProvider 884&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 1135It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.AuthenticationMethod) == loginProvider 1136&& i.FindFirstValue("amr") == "mfa" 1137&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 1152It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 1219It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 1529(userId == null || id.FindFirstValue(ClaimTypes.NameIdentifier) == userId) && 1530(loginProvider == null || id.FindFirstValue(ClaimTypes.AuthenticationMethod) == loginProvider) && 1531(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)
434return principal.FindFirstValue(Options.ClaimsIdentity.UserNameClaimType); 446return principal.FindFirstValue(Options.ClaimsIdentity.UserIdClaimType);