24 references to Fail
Aspire.Dashboard (12)
Api\ApiAuthenticationHandler.cs (4)
55return AuthenticateResult.Fail("API key authentication is enabled but no API key is configured."); 63return AuthenticateResult.Fail("Invalid API key header."); 69return AuthenticateResult.Fail("Invalid API key header."); 87return AuthenticateResult.Fail("Authentication failed.");
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (2)
22return Task.FromResult(AuthenticateResult.Fail("No type specified on this connection.")); 27return Task.FromResult(AuthenticateResult.Fail($"Connection types '{string.Join(", ", Options.RequiredConnectionTypes)}' are not enabled on this connection."));
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (3)
31return Task.FromResult(AuthenticateResult.Fail($"Multiple '{ApiKeyHeaderName}' headers in request.")); 38return Task.FromResult(AuthenticateResult.Fail($"Incoming API key from '{ApiKeyHeaderName}' header doesn't match configured API key.")); 44return Task.FromResult(AuthenticateResult.Fail($"API key from '{ApiKeyHeaderName}' header is missing."));
Mcp\McpApiKeyAuthenticationHandler.cs (3)
53return Task.FromResult(AuthenticateResult.Fail($"Multiple '{headerName}' headers in request.")); 60return Task.FromResult(AuthenticateResult.Fail($"Incoming API key from '{headerName}' header doesn't match configured API key.")); 66return Task.FromResult(AuthenticateResult.Fail($"API key header is missing. Use '{ApiAuthenticationHandler.ApiKeyHeaderName}' or '{McpApiKeyHeaderName}'."));
Aspire.Hosting (3)
Dashboard\DashboardServiceAuth.cs (3)
43return Task.FromResult(AuthenticateResult.Fail($"'{ApiKeyHeaderName}' header not found")); 48return Task.FromResult(AuthenticateResult.Fail($"Expecting only a single '{ApiKeyHeaderName}' header.")); 53return Task.FromResult(AuthenticateResult.Fail($"Invalid '{ApiKeyHeaderName}' header value."));
Microsoft.AspNetCore.Authentication (2)
Events\ResultContext.cs (1)
68public void Fail(string failureMessage) => Result = AuthenticateResult.Fail(failureMessage);
RemoteAuthenticationHandler.cs (1)
215return AuthenticateResult.Fail("Remote authentication does not directly support AuthenticateAsync");
Microsoft.AspNetCore.Authentication.BearerToken (2)
BearerTokenHandler.cs (2)
19private static readonly AuthenticateResult FailedUnprotectingToken = AuthenticateResult.Fail("Unprotected token failed"); 20private static readonly AuthenticateResult TokenExpired = AuthenticateResult.Fail("Token expired");
Microsoft.AspNetCore.Authentication.Cookies (5)
AuthenticateResults.cs (5)
8internal static AuthenticateResult FailedUnprotectingTicket = AuthenticateResult.Fail("Unprotect ticket failed"); 9internal static AuthenticateResult MissingSessionId = AuthenticateResult.Fail("SessionId missing"); 10internal static AuthenticateResult MissingIdentityInSession = AuthenticateResult.Fail("Identity missing in session store"); 11internal static AuthenticateResult ExpiredTicket = AuthenticateResult.Fail("Ticket expired"); 12internal static AuthenticateResult NoPrincipal = AuthenticateResult.Fail("No principal.");