82 references to Email
Microsoft.AspNetCore.Identity.FunctionalTests (82)
MapIdentityApiTests.cs (82)
46AssertOkAndEmpty(await client.PostAsJsonAsync("/identity/register", new { Email, Password })); 76AssertOkAndEmpty(await client.PostAsJsonAsync("/identity/register", new { Email, Password })); 77await AssertValidationProblemAsync(await client.PostAsJsonAsync("/identity/register", new { Email, Password }), 87await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 98await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 110var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 125Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 143var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 157Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 180var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 191Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 196Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 211var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 224Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 236=> client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password })); 259var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 264Assert.Equal($"Hello, {Email}!", await client.GetStringAsync($"/auth/hello?accessToken={accessToken}")); 268Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 295var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 304Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 340var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 374Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 387var user = await userManager.FindByNameAsync(Email); 406var user = await userManager.FindByNameAsync(Email); 437await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 440await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 447await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 467await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 474AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 547Assert.Equal(Email, firstEmail.Address); 549await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 553AssertOk(await client.PostAsJsonAsync("/identity/resendConfirmationEmail", new { Email = Email })); 559Assert.Equal(Email, resentEmail.Address); 562AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 581Assert.Equal(Email, email.Address); 670var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 708Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 715await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 718AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, twoFactorCode })); 728var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 752await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 755var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] }); 769AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 780var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 827var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 850await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 853AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] })); 855await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] }), 858var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[1] }); 882AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = resetRecoveryCodes[0] })); 885await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[2] }), 896var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 916await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 920var sessionLoginResponse = await client.PostAsJsonAsync("/identity/login?useSessionCookies=true", new { Email, Password, twoFactorCode }); 929var sessionLoginResponse2 = await client.PostAsJsonAsync("/identity/login?useCookies=true&useSessionCookies=true", new { Email, Password, twoFactorCode }); 938var persistentLoginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password, twoFactorCode }); 1040Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1045Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1046Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1049var newEmail = $"New-{Email}"; 1058Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1063Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Name)); 1064Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1089Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Name)); 1090Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1132var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 1136Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1140Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1141Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1144var newEmail = $"NewEmailPrefix-{Email}"; 1152Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1156Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1178Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1212await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 1214AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password = newPassword })); 1237var newEmail = $"New-{Email}"; 1251Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1258await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 1261AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password = newPassword })); 1383email ??= Email; 1391email ??= Email; 1408email ??= Email;