115 references to Response
Certificate.Optional.Sample (1)
Startup.cs (1)
27
context.
Response
.Redirect(redirect, permanent: false, preserveMethod: true);
Microsoft.AspNetCore.Authentication.Cookies (10)
CookieAuthenticationEvents.cs (10)
46
context.
Response
.Headers.Location = context.RedirectUri;
47
context.
Response
.StatusCode = 401;
51
context.
Response
.Redirect(context.RedirectUri);
63
context.
Response
.Headers.Location = context.RedirectUri;
64
context.
Response
.StatusCode = 403;
68
context.
Response
.Redirect(context.RedirectUri);
80
context.
Response
.Headers.Location = context.RedirectUri;
84
context.
Response
.Redirect(context.RedirectUri);
96
context.
Response
.Headers.Location = context.RedirectUri;
100
context.
Response
.Redirect(context.RedirectUri);
Microsoft.AspNetCore.Authentication.Negotiate.Test (12)
EventTests.cs (12)
32
Assert.Equal(StatusCodes.Status200OK, context.
Response
.StatusCode);
33
Assert.False(context.
Response
.Headers.ContainsKey(HeaderNames.WWWAuthenticate));
55
context.
Response
.StatusCode = StatusCodes.Status418ImATeapot;
56
context.
Response
.Headers.WWWAuthenticate = "Teapot";
103
context.
Response
.StatusCode = StatusCodes.Status418ImATeapot;
104
context.
Response
.Headers.WWWAuthenticate = "Teapot";
153
context.
Response
.StatusCode = StatusCodes.Status418ImATeapot;
154
context.
Response
.Headers.WWWAuthenticate = "Teapot";
203
context.
Response
.StatusCode = StatusCodes.Status418ImATeapot;
204
context.
Response
.Headers.WWWAuthenticate = "Teapot";
253
context.
Response
.StatusCode = StatusCodes.Status418ImATeapot;
254
context.
Response
.Headers.WWWAuthenticate = "Teapot";
Microsoft.AspNetCore.Authentication.OAuth (1)
Events\OAuthEvents.cs (1)
21
context.
Response
.Redirect(context.RedirectUri);
Microsoft.AspNetCore.Authentication.Test (78)
FacebookTests.cs (1)
97
context.
Response
.Redirect(context.RedirectUri + "&custom=test");
GoogleTests.cs (7)
327
context.
Response
.Redirect(context.RedirectUri + "&custom=test");
389
ctx.
Response
.Redirect("/error?FailureMessage=AccessDenied");
471
ctx.
Response
.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.Failure.Message));
507
ctx.
Response
.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.Failure.Message));
608
ctx.
Response
.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.Failure.Message));
661
ctx.
Response
.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.Failure.Message));
840
ctx.
Response
.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.Failure.Message));
JwtBearerTests.cs (9)
184
context.
Response
.StatusCode = 401;
595
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
666
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
742
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
853
context.
Response
.StatusCode = 418;
854
return context.
Response
.WriteAsync("You Shall Not Pass");
876
if (!context.
Response
.HasStarted)
878
context.
Response
.StatusCode = 418;
879
return context.
Response
.WriteAsync("You Shall Not Pass");
JwtBearerTests_Handler.cs (9)
174
context.
Response
.StatusCode = 401;
556
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
624
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
694
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
799
context.
Response
.StatusCode = 418;
800
return context.
Response
.WriteAsync("You Shall Not Pass");
821
if (!context.
Response
.HasStarted)
823
context.
Response
.StatusCode = 418;
824
return context.
Response
.WriteAsync("You Shall Not Pass");
MicrosoftAccountTests.cs (1)
57
context.
Response
.Redirect(context.RedirectUri + "&custom=test");
OAuthTests.cs (3)
337
context.
Response
.StatusCode = StatusCodes.Status406NotAcceptable;
373
context.
Response
.StatusCode = StatusCodes.Status406NotAcceptable;
409
context.
Response
.StatusCode = StatusCodes.Status406NotAcceptable;
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (1)
87
ctx.
Response
.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.Failure.Message));
OpenIdConnect\OpenIdConnectChallengeTests.cs (2)
376
context.
Response
.StatusCode = 410;
377
context.
Response
.Headers.Add("tea", "Oolong");
OpenIdConnect\OpenIdConnectEventTests.cs (20)
86
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
157
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
182
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
193
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
267
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
297
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
374
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
405
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
482
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
513
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
593
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
625
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
723
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
771
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
817
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
888
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
941
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
983
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
1030
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
1096
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (20)
86
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
157
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
182
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
193
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
267
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
297
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
374
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
405
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
482
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
513
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
593
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
625
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
723
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
771
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
817
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
888
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
941
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
983
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
1030
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
1096
context.
Response
.StatusCode = StatusCodes.Status202Accepted;
TwitterTests.cs (3)
55
context.
Response
.Redirect(context.RedirectUri + "&custom=test");
244
context.
Response
.StatusCode = StatusCodes.Status406NotAcceptable;
350
context.
Response
.StatusCode = StatusCodes.Status406NotAcceptable;
WsFederation\WsFederationTest.cs (1)
352
context.
Response
.Headers["EventHeader"] = "OnRemoteSignOut";
WsFederation\WsFederationTest_Handler.cs (1)
348
context.
Response
.Headers["EventHeader"] = "OnRemoteSignOut";
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterEvents.cs (1)
21
context.
Response
.Redirect(context.RedirectUri);
OpenIdConnectSample (4)
Startup.cs (4)
128
c.
Response
.StatusCode = 500;
129
c.
Response
.ContentType = "text/plain";
133
return c.
Response
.WriteAsync(c.Exception.ToString());
135
return c.
Response
.WriteAsync("An error occurred processing your authentication.");
SocialSample (8)
Startup.cs (8)
216
context.
Response
.StatusCode = 500;
217
context.
Response
.ContentType = "text/html";
218
await context.
Response
.WriteAsync("<html><body>");
219
await context.
Response
.WriteAsync("A remote failure has occurred: <br>" +
224
await context.
Response
.WriteAsync("Properties:<br>");
227
await context.
Response
.WriteAsync($"-{ HtmlEncoder.Default.Encode(pair.Key)}={ HtmlEncoder.Default.Encode(pair.Value)}<br>");
231
await context.
Response
.WriteAsync("<a href=\"/\">Home</a>");
232
await context.
Response
.WriteAsync("</body></html>");