142 references to SendAsync
Microsoft.AspNetCore.Authentication.Test (142)
CookieTests.cs (15)
587var transaction3 = await server.SendAsync("http://example.com/normal", transaction1.CookieNameValue); 591var transaction4 = await server.SendAsync("http://example.com/signout", transaction3.SetCookie[0]); 1250var transaction = await server.SendAsync("http://example.com/login"); 1286var transaction = await server.SendAsync("http://example.com"); 1312var transaction = await server.SendAsync("http://example.com"); 1340var transaction = await server.SendAsync("http://example.com"); 1364var transaction = await server.SendAsync("http://example.com/notlogin?ReturnUrl=%2Fpage"); 1386var transaction = await server.SendAsync("http://example.com/login?ReturnUrl=%2Fpage"); 1412var transaction = await server.SendAsync("http://example.com/notlogout?ReturnUrl=%2Fpage"); 1434var transaction = await server.SendAsync("http://example.com/logout?ReturnUrl=%2Fpage"); 1459var transaction = await server.SendAsync("http://example.com/forbid"); 1484var transaction = await server.SendAsync("http://example.com/base/login"); 1626var transaction = await server.SendAsync("http://example.com/base/forbid"); 1727var cookie = (await server.SendAsync("http://www.example.com/signin")).SetCookie.FirstOrDefault(); 1730var transaction = await server.SendAsync("http://www.example.com/", cookie);
DynamicSchemeTests.cs (12)
33var transaction = await server.SendAsync("http://example.com/auth/One"); 38transaction = await server.SendAsync("http://example.com/auth/One"); 45transaction = await server.SendAsync("http://example.com/auth/Two"); 50transaction = await server.SendAsync("http://example.com/auth/One"); 53transaction = await server.SendAsync("http://example.com/auth/Two"); 63await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/One")); 68var transaction = await server.SendAsync("http://example.com/auth/One"); 74transaction = await server.SendAsync("http://example.com/auth/Two"); 80await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/Two")); 81transaction = await server.SendAsync("http://example.com/auth/One"); 87await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/Two")); 88await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/One"));
FacebookTests.cs (12)
57var transaction = await server.SendAsync("http://example.com/challenge"); 73var transaction = await server.SendAsync("http://example.com/challenge"); 109var transaction = await server.SendAsync("http://example.com/challenge"); 138var transaction = await server.SendAsync("http://example.com/challenge"); 170var transaction = await server.SendAsync("http://example.com/challenge"); 202var transaction = await server.SendAsync("http://example.com/challenge"); 230var transaction = await server.SendAsync("http://example.com/base/login"); 263var transaction = await server.SendAsync("http://example.com/login"); 298var transaction = await server.SendAsync("http://example.com/challenge"); 363var transaction = await server.SendAsync( 433var transaction = await server.SendAsync("https://example.com/challenge"); 445transaction = await server.SendAsync(
GoogleTests.cs (38)
54var transaction = await server.SendAsync("https://example.com/challenge"); 85var transaction = await server.SendAsync("https://example.com/signIn"); 98var transaction = await server.SendAsync("https://example.com/signOut"); 111var transaction = await server.SendAsync("https://example.com/signOut"); 124var transaction = await server.SendAsync("https://example.com/401"); 137var transaction = await server.SendAsync("https://example.com/challenge"); 150var transaction = await server.SendAsync("https://example.com/challenge"); 186var transaction = await server.SendAsync("https://example.com/challenge2"); 238var transaction = await server.SendAsync("https://example.com/challenge2"); 294var transaction = await server.SendAsync("https://example.com/challenge2"); 333var transaction = await server.SendAsync("https://example.com/challenge"); 358var transaction = await server.SendAsync("https://example.com/auth"); 371var error = await Assert.ThrowsAnyAsync<Exception>(() => server.SendAsync("https://example.com/signin-google?code=TestCode")); 396var sendTask = server.SendAsync("https://example.com/signin-google?error=access_denied&error_description=SoBad&error_uri=foobar&state=protected_state", 435var transaction = await server.SendAsync("https://example.com/signin-google?error=access_denied&error_description=SoBad&error_uri=foobar&state=protected_state", 478var transaction = await server.SendAsync("https://example.com/signin-google?error=access_denied&error_description=whyitfailed&error_uri=https://example.com/fail&state=protected_state", 514var sendTask = server.SendAsync("https://example.com/signin-google?error=itfailed&error_description=whyitfailed&error_uri=https://example.com/fail&state=protected_state", 555var transaction = await server.SendAsync( 565transaction = await server.SendAsync("https://example.com/me", authCookie); 577transaction = await server.SendAsync("https://example.com/tokens", authCookie); 622var sendTask = server.SendAsync( 674var sendTask = server.SendAsync( 718var transaction = await server.SendAsync( 728transaction = await server.SendAsync("https://example.com/me", authCookie); 758var transaction = await server.SendAsync( 805var transaction = await server.SendAsync( 824var error = await Assert.ThrowsAnyAsync<Exception>(() => server.SendAsync("https://example.com/signin-google?code=TestCode")); 849var transaction = await server.SendAsync( 879var transaction = await server.SendAsync( 889transaction = await server.SendAsync("https://example.com/authenticate", authCookie); 923var transaction = await server.SendAsync( 933transaction = await server.SendAsync("https://example.com/authenticateGoogle", authCookie); 967var transaction = await server.SendAsync( 977transaction = await server.SendAsync("https://example.com/authenticateFacebook", authCookie); 1004var transaction = await server.SendAsync( 1014transaction = await server.SendAsync("https://example.com/challengeFacebook", authCookie); 1066var transaction = await server.SendAsync("https://example.com/challenge"); 1078transaction = await server.SendAsync(
JwtBearerTests.cs (3)
162var transaction = await server.SendAsync("https://example.com/signIn"); 171var transaction = await server.SendAsync("https://example.com/signOut"); 214var transaction = await server.SendAsync("https://example.com/signIn");
JwtBearerTests_Handler.cs (3)
152var transaction = await server.SendAsync("https://example.com/signIn"); 161var transaction = await server.SendAsync("https://example.com/signOut"); 201var transaction = await server.SendAsync("https://example.com/signIn");
MicrosoftAccountTests.cs (13)
64var transaction = await server.SendAsync("http://example.com/challenge"); 79var transaction = await server.SendAsync("https://example.com/signIn"); 92var transaction = await server.SendAsync("https://example.com/signOut"); 105var transaction = await server.SendAsync("https://example.com/signOut"); 118var transaction = await server.SendAsync("http://example.com/challenge"); 143var transaction = await server.SendAsync("http://example.com/challenge"); 161var transaction = await server.SendAsync("http://example.com/challengeWithOtherScope"); 179var transaction = await server.SendAsync("http://example.com/challengeWithOtherScopeWithBaseAuthenticationProperties"); 240var transaction = await server.SendAsync( 250transaction = await server.SendAsync("https://example.com/me", authCookie); 266var transaction = await server.SendAsync("https://example.com/challenge"); 333var transaction = await server.SendAsync("https://example.com/challenge"); 345transaction = await server.SendAsync(
OAuthTests.cs (17)
47await Assert.ThrowsAsync<ArgumentNullException>("ClientId", () => server.SendAsync("http://example.com/")); 63await Assert.ThrowsAsync<ArgumentNullException>("ClientSecret", () => server.SendAsync("http://example.com/")); 79await Assert.ThrowsAsync<ArgumentException>("CallbackPath", () => server.SendAsync("http://example.com/")); 95await Assert.ThrowsAsync<ArgumentNullException>("TokenEndpoint", () => server.SendAsync("http://example.com/")); 111await Assert.ThrowsAsync<ArgumentNullException>("AuthorizationEndpoint", () => server.SendAsync("http://example.com/")); 131var transaction = await server.SendAsync("https://www.example.com/challenge"); 159var transaction = await server.SendAsync("https://www.example.com/challenge"); 189var transaction = await server.SendAsync("https://www.example.com/challenge"); 215var transaction = await server.SendAsync("https://www.example.com/challenge"); 244var transaction = await server.SendAsync("https://www.example.com/challenge"); 273var transaction = await server.SendAsync("https://www.example.com/challenge"); 310var transaction = await server.SendAsync("https://www.example.com/oauth-callback?error=access_denied&state=protected_state", 345var transaction = await server.SendAsync("https://www.example.com/oauth-callback?error=access_denied&state=protected_state", 381var transaction = await server.SendAsync("https://www.example.com/oauth-callback?error=access_denied&state=protected_state", 417var transaction = await server.SendAsync("https://www.example.com/oauth-callback?error=custom_error&state=protected_state", 467() => server.SendAsync("https://www.example.com/oauth-callback?code=random_code&state=protected_state", ".AspNetCore.Correlation.correlationId=N")); 508() => server.SendAsync("https://www.example.com/oauth-callback?code=random_code&state=protected_state", ".AspNetCore.Correlation.correlationId=N"));
PolicyTests.cs (8)
38var transaction = await server.SendAsync("http://example.com/auth/policy1"); 41transaction = await server.SendAsync("http://example.com/auth/auth1"); 44transaction = await server.SendAsync("http://example.com/auth/auth2"); 47transaction = await server.SendAsync("http://example.com/auth/auth3"); 50transaction = await server.SendAsync("http://example.com/auth/policy2"); 353var transaction = await server.SendAsync("http://example.com/auth/dynamic?auth1"); 355transaction = await server.SendAsync("http://example.com/auth/dynamic?auth2"); 357transaction = await server.SendAsync("http://example.com/auth/dynamic?auth3");
RemoteAuthenticationTests.cs (3)
69var error = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("https://example.com/challenge")); 82var error = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("https://example.com/challenge")); 97var error = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("https://example.com/challenge"));
TwitterTests.cs (18)
70var transaction = await server.SendAsync("http://example.com/challenge"); 89await Assert.ThrowsAsync<ArgumentNullException>("ConsumerKey", async () => await server.SendAsync("http://example.com/challenge")); 105await Assert.ThrowsAsync<ArgumentNullException>("ConsumerSecret", async () => await server.SendAsync("http://example.com/challenge")); 119var error = await Assert.ThrowsAnyAsync<Exception>(() => server.SendAsync("https://example.com/signin-twitter")); 132var transaction = await server.SendAsync("https://example.com/signIn"); 145var transaction = await server.SendAsync("https://example.com/signOut"); 158var transaction = await server.SendAsync("https://example.com/signOut"); 180var transaction = await server.SendAsync("http://example.com/challenge"); 208var transaction = await server.SendAsync("http://example.com/challenge"); 258var transaction = await server.SendAsync("http://example.com/challenge"); 297await server.SendAsync("http://example.com/challenge"); 327await server.SendAsync("http://example.com/challenge"); 365var transaction = await server.SendAsync("http://example.com/challenge"); 428var transaction = await server.SendAsync( 435transaction = await server.SendAsync("https://example.com/me", authCookie); 443transaction = await server.SendAsync("https://example.com/tokens", authCookie); 507var transaction = await server.SendAsync( 525transaction = await server.SendAsync("https://example.com/me", authCookie);