4 writes to Id
Microsoft.AspNetCore.Identity.Test (4)
SignInManagerTest.cs (3)
1033var user = new PocoUser { Id = "foo", UserName = "Foo" }; 1064var user = new PocoUser { Id = "foo", UserName = "Foo" }; 1095var user = new PocoUser { Id = "foo", UserName = "Foo" };
src\Identity\test\Shared\PocoModel\PocoUser.cs (1)
16Id = Guid.NewGuid().ToString();
42 references to Id
Microsoft.AspNetCore.Identity.Test (42)
NoopUserStore.cs (1)
10return Task.FromResult(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 (28)
94manager.Setup(m => m.FindByIdAsync(user.Id)).ReturnsAsync(user); 95manager.Setup(m => m.GetUserIdAsync(user)).ReturnsAsync(user.Id.ToString()); 128SetupSignIn(context, auth, user.Id, isPersistent, loginProvider: null, amr: "pwd"); 152SetupSignIn(context, auth, user.Id, false, loginProvider: null, amr: "pwd"); 215id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); 284It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 323SetupSignIn(context, auth, user.Id, false, loginProvider); 328It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 373var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 374SetupSignIn(context, auth, user.Id, isPersistent); 381It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 415var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 454var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 530var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, externalLogin ? loginProvider : null); 536&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 543SetupSignIn(context, auth, user.Id); 579SetupSignIn(context, auth, user.Id, isPersistent, loginProvider); 673var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, externalLogin ? loginProvider : null); 680&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 689SetupSignIn(context, auth, user.Id, isPersistent, null, "mfa"); 695It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 733var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, loginProvider: null); 759It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 791id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); 946SetupSignIn(context, auth, user.Id, isPersistent: null, loginProvider: null, amr: "pwd"); 1000SetupSignIn(context, auth, user.Id, isPersistent: null, loginProvider: null, amr: "pwd"); 1200var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 1266var 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)
209store.Setup(s => s.FindByIdAsync(user.Id, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 213var result = await userManager.FindByIdAsync(user.Id); 1763.Returns(Task.FromResult(user2.Id))