5 writes to Id
Microsoft.AspNetCore.Identity.Test (5)
Passkeys\DefaultPasskeyHandlerAssertionTest.cs (1)
1190Id = "df0a3af4-bd65-440f-82bd-5b839e300dcd",
SignInManagerTest.cs (3)
1135var user = new PocoUser { Id = "foo", UserName = "Foo" }; 1166var user = new PocoUser { Id = "foo", UserName = "Foo" }; 1197var user = new PocoUser { Id = "foo", UserName = "Foo" };
src\Identity\test\Shared\PocoModel\PocoUser.cs (1)
18Id = Guid.NewGuid().ToString();
49 references to Id
Microsoft.AspNetCore.Identity.Test (49)
NoopUserStore.cs (1)
10return Task.FromResult(user.Id);
Passkeys\DefaultPasskeyHandlerAssertionTest.cs (4)
461var newUserId = test.User.Id[..^1]; 1262"userHandle": {{ToBase64UrlJsonValue(User.Id)}} 1289.Setup(m => m.FindByIdAsync(User.Id)) 1302.Returns(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 (31)
97manager.Setup(m => m.FindByIdAsync(user.Id)).ReturnsAsync(user); 98manager.Setup(m => m.GetUserIdAsync(user)).ReturnsAsync(user.Id.ToString()); 146SetupSignIn(context, auth, user.Id, isPersistent, loginProvider: null, amr: "pwd"); 170SetupSignIn(context, auth, user.Id, false, loginProvider: null, amr: "pwd"); 233id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); 302It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 341SetupSignIn(context, auth, user.Id, false, loginProvider); 346It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.Id), 378SetupSignIn(context, auth, user.Id, isPersistent: false, loginProvider: null); 382var passkeyRequestOptions = new PasskeyRequestOptions(userId: user.Id, "<some-options>"); 423var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 424SetupSignIn(context, auth, user.Id, isPersistent); 431It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 465var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 504var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 580var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, externalLogin ? loginProvider : null); 586&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 593SetupSignIn(context, auth, user.Id); 629SetupSignIn(context, auth, user.Id, isPersistent, loginProvider); 664manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns(user.Id.ToString()); 775var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, externalLogin ? loginProvider : null); 782&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.Id), 791SetupSignIn(context, auth, user.Id, isPersistent, null, "mfa"); 797It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 835var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, loginProvider: null); 861It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.Id 893id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); 1048SetupSignIn(context, auth, user.Id, isPersistent: null, loginProvider: null, amr: "pwd"); 1102SetupSignIn(context, auth, user.Id, isPersistent: null, loginProvider: null, amr: "pwd"); 1302var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.Id, null); 1368var 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); 1907.Returns(Task.FromResult(user2.Id))