5 writes to Id
Microsoft.AspNetCore.Identity.Test (5)
Passkeys\PasskeyHandlerAssertionTest.cs (1)
987Id = "df0a3af4-bd65-440f-82bd-5b839e300dcd",
SignInManagerTest.cs (3)
1420var user = new PocoUser { Id = "foo", UserName = "Foo" }; 1451var user = new PocoUser { Id = "foo", UserName = "Foo" }; 1482var user = new PocoUser { Id = "foo", UserName = "Foo" };
src\Identity\test\Shared\PocoModel\PocoUser.cs (1)
18Id = Guid.NewGuid().ToString();
48 references to Id
Microsoft.AspNetCore.Identity.Test (48)
NoopUserStore.cs (1)
10return Task.FromResult(user.Id);
Passkeys\PasskeyHandlerAssertionTest.cs (4)
443var newUserId = test.User.Id[..^1]; 1026.Setup(m => m.FindByIdAsync(User.Id)) 1043.Returns(Task.FromResult(User.Id)); 1083"userHandle": {{ToBase64UrlJsonValue(User.Id)}}
SecurityStampValidatorTest.cs (8)
79id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 112id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 139id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 180tid.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 221id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 258id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 296id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id)); 325userManager.Setup(u => u.GetUserIdAsync(user)).ReturnsAsync(user.Id).Verifiable();
SignInManagerTest.cs (30)
129manager.Setup(m => m.FindByIdAsync(user.Id)).ReturnsAsync(user); 130manager.Setup(m => m.GetUserIdAsync(user)).ReturnsAsync(user.Id.ToString()); 175SetupSignIn(context, auth, user.Id, isPersistent, loginProvider: null, amr: "pwd"); 199SetupSignIn(context, auth, user.Id, false, loginProvider: null, amr: "pwd"); 262id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); 331It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 374SetupSignIn(context, auth, user.Id, false, loginProvider); 379It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 456SetupSignIn(context, auth, user.Id, isPersistent: false, loginProvider: null); 559var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 560SetupSignIn(context, auth, user.Id, isPersistent); 567It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 601var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 640var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 716var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, externalLogin ? loginProvider : null); 722&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 729SetupSignIn(context, auth, user.Id); 765SetupSignIn(context, auth, user.Id, isPersistent, loginProvider); 835manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns(user.Id.ToString()); 968var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, externalLogin ? loginProvider : null); 975&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 984SetupSignIn(context, auth, user.Id, isPersistent, null, "mfa"); 990It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 1028var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, loginProvider: null); 1057It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 1129id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); 1333SetupSignIn(context, auth, user.Id, isPersistent: null, loginProvider: null, amr: "pwd"); 1387SetupSignIn(context, auth, user.Id, isPersistent: null, loginProvider: null, amr: "pwd"); 1587var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 1653var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null);
UserClaimsPrincipalFactoryTest.cs (2)
49userManager.Setup(m => m.GetUserIdAsync(user)).ReturnsAsync(user.Id); 98Assert.Contains(claims, c => c.Type == manager.Options.ClaimsIdentity.UserIdClaimType && c.Value == user.Id);
UserManagerTest.cs (3)
250store.Setup(s => s.FindByIdAsync(user.Id, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 254var result = await userManager.FindByIdAsync(user.Id); 2163.Returns(Task.FromResult(user2.Id))