28 references to FindFirstValue
Identity.ExternalClaims (1)
Pages\Account\ExternalLogin.cshtml.cs (1)
102
Email = info.Principal.
FindFirstValue
(ClaimTypes.Email)
IdentitySample.Mvc (1)
Controllers\AccountController.cs (1)
191
var email = info.Principal.
FindFirstValue
(ClaimTypes.Email);
Microsoft.AspNetCore.Identity (7)
SignInManager.cs (7)
279
if (await ValidateSecurityStampAsync(user, principal.
FindFirstValue
(Options.ClaimsIdentity.SecurityStampClaimType)))
302
if (await ValidateSecurityStampAsync(user, principal.
FindFirstValue
(Options.ClaimsIdentity.SecurityStampClaimType)))
440
return (result?.Principal != null && result.Principal.
FindFirstValue
(ClaimTypes.Name) == userId);
705
var providerKey = auth.Principal.
FindFirstValue
(ClaimTypes.NameIdentifier) ?? auth.Principal.
FindFirstValue
("sub");
872
var userId = result.Principal.
FindFirstValue
(ClaimTypes.Name);
887
LoginProvider = result.Principal.
FindFirstValue
(ClaimTypes.AuthenticationMethod),
Microsoft.AspNetCore.Identity.FunctionalTests (1)
RegistrationTests.cs (1)
231
authenticationMethod = user.
FindFirstValue
(ClaimTypes.AuthenticationMethod), IdentityConstants.ApplicationScheme);
Microsoft.AspNetCore.Identity.Test (14)
PrincipalExtensionsTest.cs (1)
16
Assert.Null(id.
FindFirstValue
("bogus"));
SignInManagerTest.cs (13)
284
It.Is<ClaimsPrincipal>(id => id.
FindFirstValue
(ClaimTypes.Name) == user.Id),
328
It.Is<ClaimsPrincipal>(id => id.
FindFirstValue
(ClaimTypes.Name) == user.Id),
381
It.Is<ClaimsPrincipal>(i => i.
FindFirstValue
(ClaimTypes.Name) == user.Id
535
It.Is<ClaimsPrincipal>(i => i.
FindFirstValue
(ClaimTypes.AuthenticationMethod) == loginProvider
536
&& i.
FindFirstValue
(ClaimTypes.NameIdentifier) == user.Id),
678
It.Is<ClaimsPrincipal>(i => i.
FindFirstValue
(ClaimTypes.AuthenticationMethod) == loginProvider
679
&& i.
FindFirstValue
("amr") == "mfa"
680
&& i.
FindFirstValue
(ClaimTypes.NameIdentifier) == user.Id),
695
It.Is<ClaimsPrincipal>(i => i.
FindFirstValue
(ClaimTypes.Name) == user.Id
759
It.Is<ClaimsPrincipal>(i => i.
FindFirstValue
(ClaimTypes.Name) == user.Id
980
(userId == null || id.
FindFirstValue
(ClaimTypes.NameIdentifier) == userId) &&
981
(loginProvider == null || id.
FindFirstValue
(ClaimTypes.AuthenticationMethod) == loginProvider) &&
982
(amr == null || id.
FindFirstValue
("amr") == amr)),
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
163
Email = info.Principal.
FindFirstValue
(ClaimTypes.Email)!
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
163
Email = info.Principal.
FindFirstValue
(ClaimTypes.Email)!
Microsoft.Extensions.Identity.Core (2)
UserManager.cs (2)
410
return principal.
FindFirstValue
(Options.ClaimsIdentity.UserNameClaimType);
422
return principal.
FindFirstValue
(Options.ClaimsIdentity.UserIdClaimType);