84 references to Email
Microsoft.AspNetCore.Identity.FunctionalTests (84)
MapIdentityApiTests.cs (84)
49AssertOkAndEmpty(await client.PostAsJsonAsync("/identity/register", new { Email, Password })); 79AssertOkAndEmpty(await client.PostAsJsonAsync("/identity/register", new { Email, Password })); 80await AssertValidationProblemAsync(await client.PostAsJsonAsync("/identity/register", new { Email, Password }), 90await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 101await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 113var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 128Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 146var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 160Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 183var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 194Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 199Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 214var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 227Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 239=> client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password })); 262var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 267Assert.Equal($"Hello, {Email}!", await client.GetStringAsync($"/auth/hello?accessToken={accessToken}")); 271Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 298var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 307Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 343var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 377Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 390var user = await userManager.FindByNameAsync(Email); 409var user = await userManager.FindByNameAsync(Email); 440await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 443await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 450await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 470await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password = "wrong" }), 477AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 550Assert.Equal(Email, firstEmail.Address); 552await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 556AssertOk(await client.PostAsJsonAsync("/identity/resendConfirmationEmail", new { Email = Email })); 562Assert.Equal(Email, resentEmail.Address); 565AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 584Assert.Equal(Email, email.Address); 673var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 711Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 718await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 721AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, twoFactorCode })); 731var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 755await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 758var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] }); 772AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 782var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 829var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 852await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 855AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] })); 857await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] }), 860var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[1] }); 884AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = resetRecoveryCodes[0] })); 887await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[2] }), 898var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 918await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 922var sessionLoginResponse = await client.PostAsJsonAsync("/identity/login?useSessionCookies=true", new { Email, Password, twoFactorCode }); 931var sessionLoginResponse2 = await client.PostAsJsonAsync("/identity/login?useCookies=true&useSessionCookies=true", new { Email, Password, twoFactorCode }); 940var persistentLoginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password, twoFactorCode }); 1042Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1047Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1048Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1051var newEmail = $"New-{Email}"; 1060Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1065Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Name)); 1066Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1091Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Name)); 1092Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1134var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 1138Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1142Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1143Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1146var newEmail = $"NewEmailPrefix-{Email}"; 1154Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1158Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1180Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1214await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 1216AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password = newPassword })); 1239var newEmail = $"New-{Email}"; 1253Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1260await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 1263AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password = newPassword })); 1295AssertOkAndEmpty(await client.PostAsJsonAsync("/identity/register", new { Email, Password })); 1304AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 1423email ??= Email; 1431email ??= Email; 1448email ??= Email;