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 })); 783var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 830var loginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password }); 853await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 856AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] })); 858await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[0] }), 861var recoveryLoginResponse = await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[1] }); 885AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = resetRecoveryCodes[0] })); 888await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password, TwoFactorRecoveryCode = recoveryCodes[2] }), 899var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 919await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 923var sessionLoginResponse = await client.PostAsJsonAsync("/identity/login?useSessionCookies=true", new { Email, Password, twoFactorCode }); 932var sessionLoginResponse2 = await client.PostAsJsonAsync("/identity/login?useCookies=true&useSessionCookies=true", new { Email, Password, twoFactorCode }); 941var persistentLoginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password, twoFactorCode }); 1043Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1048Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1049Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1052var newEmail = $"New-{Email}"; 1061Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1066Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Name)); 1067Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1092Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Name)); 1093Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1135var loginResponse = await client.PostAsJsonAsync("/identity/login?useCookies=true", new { Email, Password }); 1139Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1143Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1144Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1147var newEmail = $"NewEmailPrefix-{Email}"; 1155Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1159Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1181Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1215await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 1217AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password = newPassword })); 1240var newEmail = $"New-{Email}"; 1254Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1261await AssertProblemAsync(await client.PostAsJsonAsync("/identity/login", new { Email, Password }), 1264AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password = newPassword })); 1296AssertOkAndEmpty(await client.PostAsJsonAsync("/identity/register", new { Email, Password })); 1305AssertOk(await client.PostAsJsonAsync("/identity/login", new { Email, Password })); 1424email ??= Email; 1432email ??= Email; 1449email ??= Email;