1 write to Failure
Microsoft.AspNetCore.Authentication (1)
Events\RemoteFailureContext.cs (1)
27
Failure
= failure;
24 references to Failure
Microsoft.AspNetCore.Authentication (2)
RemoteAuthenticationHandler.cs (2)
138
if (errorContext.
Failure
!= null)
140
throw new AuthenticationFailureException("An error was encountered while handling the remote login.", errorContext.
Failure
);
Microsoft.AspNetCore.Authentication.Test (21)
GoogleTests.cs (7)
463
var ex = ctx.
Failure
;
471
ctx.Response.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.
Failure
.Message));
500
var ex = ctx.
Failure
;
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));
OAuthTests.cs (6)
371
Assert.Equal("Access was denied by the resource owner or by the remote server.", context.
Failure
.Message);
407
Assert.Contains("custom_error", context.
Failure
.Message);
457
Assert.Equal("incorrect_client_credentials", context.
Failure
.Data["error"]);
458
Assert.Equal("The client_id and/or client_secret passed are incorrect.", context.
Failure
.Data["error_description"]);
459
Assert.Equal("https://example.com/troubleshooting-oauth-app-access-token-request-errors/#incorrect-client-credentials", context.
Failure
.Data["error_uri"]);
500
Assert.StartsWith("OAuth token endpoint failure:", context.
Failure
.Message);
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (2)
80
var ex = ctx.
Failure
;
87
ctx.Response.Redirect("/error?FailureMessage=" + UrlEncoder.Default.Encode(ctx.
Failure
.Message));
OpenIdConnect\OpenIdConnectEventTests.cs (2)
853
Assert.Equal("TestException", context.
Failure
.Message);
885
Assert.Equal("TestException", context.
Failure
.Message);
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (2)
853
Assert.Equal("TestException", context.
Failure
.Message);
885
Assert.Equal("TestException", context.
Failure
.Message);
TwitterTests.cs (2)
346
Assert.NotNull(context.
Failure
);
347
Assert.Equal("Access was denied by the resource owner or by the remote server.", context.
Failure
.Message);
SocialSample (1)
Startup.cs (1)
220
context.
Failure
.Message.Split(Environment.NewLine).Select(s => HtmlEncoder.Default.Encode(s) + "<br>").Aggregate((s1, s2) => s1 + s2));