5 writes to Id
Microsoft.AspNetCore.Identity.Test (5)
Passkeys\DefaultPasskeyHandlerAssertionTest.cs (1)
1190
Id
= "df0a3af4-bd65-440f-82bd-5b839e300dcd",
SignInManagerTest.cs (3)
1135
var user = new PocoUser {
Id
= "foo", UserName = "Foo" };
1166
var user = new PocoUser {
Id
= "foo", UserName = "Foo" };
1197
var user = new PocoUser {
Id
= "foo", UserName = "Foo" };
src\Identity\test\Shared\PocoModel\PocoUser.cs (1)
18
Id
= Guid.NewGuid().ToString();
49 references to Id
Microsoft.AspNetCore.Identity.Test (49)
NoopUserStore.cs (1)
10
return Task.FromResult(user.
Id
);
Passkeys\DefaultPasskeyHandlerAssertionTest.cs (4)
461
var 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)
79
id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
112
id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
139
id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
180
tid.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
221
id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
258
id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
296
id.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.
Id
));
325
userManager.Setup(u => u.GetUserIdAsync(user)).ReturnsAsync(user.
Id
).Verifiable();
SignInManagerTest.cs (31)
97
manager.Setup(m => m.FindByIdAsync(user.
Id
)).ReturnsAsync(user);
98
manager.Setup(m => m.GetUserIdAsync(user)).ReturnsAsync(user.
Id
.ToString());
146
SetupSignIn(context, auth, user.
Id
, isPersistent, loginProvider: null, amr: "pwd");
170
SetupSignIn(context, auth, user.
Id
, false, loginProvider: null, amr: "pwd");
233
id.AddClaim(new Claim(ClaimTypes.Name, user.
Id
));
302
It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.
Id
),
341
SetupSignIn(context, auth, user.
Id
, false, loginProvider);
346
It.Is<ClaimsPrincipal>(id => id.FindFirstValue(ClaimTypes.Name) == user.
Id
),
378
SetupSignIn(context, auth, user.
Id
, isPersistent: false, loginProvider: null);
382
var passkeyRequestOptions = new PasskeyRequestOptions(userId: user.
Id
, "<some-options>");
423
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, null);
424
SetupSignIn(context, auth, user.
Id
, isPersistent);
431
It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.
Id
465
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, null);
504
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, null);
580
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, externalLogin ? loginProvider : null);
586
&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.
Id
),
593
SetupSignIn(context, auth, user.
Id
);
629
SetupSignIn(context, auth, user.
Id
, isPersistent, loginProvider);
664
manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns(user.
Id
.ToString());
775
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, externalLogin ? loginProvider : null);
782
&& i.FindFirstValue(ClaimTypes.NameIdentifier) == user.
Id
),
791
SetupSignIn(context, auth, user.
Id
, isPersistent, null, "mfa");
797
It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.
Id
835
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, loginProvider: null);
861
It.Is<ClaimsPrincipal>(i => i.FindFirstValue(ClaimTypes.Name) == user.
Id
893
id.AddClaim(new Claim(ClaimTypes.Name, user.
Id
));
1048
SetupSignIn(context, auth, user.
Id
, isPersistent: null, loginProvider: null, amr: "pwd");
1102
SetupSignIn(context, auth, user.
Id
, isPersistent: null, loginProvider: null, amr: "pwd");
1302
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, null);
1368
var id = SignInManager<PocoUser>.StoreTwoFactorInfo(user.
Id
, null);
UserClaimsPrincipalFactoryTest.cs (2)
49
userManager.Setup(m => m.GetUserIdAsync(user)).ReturnsAsync(user.
Id
);
98
Assert.Contains(claims, c => c.Type == manager.Options.ClaimsIdentity.UserIdClaimType && c.Value == user.
Id
);
UserManagerTest.cs (3)
209
store.Setup(s => s.FindByIdAsync(user.
Id
, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable();
213
var result = await userManager.FindByIdAsync(user.
Id
);
1907
.Returns(Task.FromResult(user2.
Id
))