aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-06-12 14:35:51 -0600
committercrobibero <cody@robibe.ro>2020-06-12 14:35:51 -0600
commit2fe65d99f6886d607d618903ac03f7474ce68df0 (patch)
tree681efab6ef8fdbffc8b8ddb3e09bc811c733a10d /Jellyfin.Api/Auth/CustomAuthenticationHandler.cs
parentdfe873fc293cf940a4f3d25aacdc8dfc53f150dc (diff)
parent6429e60c408c0b88edee6745c5c9c14faade3c9d (diff)
Merge remote-tracking branch 'upstream/api-migration' into api-swagger-auth
Diffstat (limited to 'Jellyfin.Api/Auth/CustomAuthenticationHandler.cs')
-rw-r--r--Jellyfin.Api/Auth/CustomAuthenticationHandler.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs
index 26f7d9d2d..a0c9c3f5a 100644
--- a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs
+++ b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs
@@ -37,13 +37,20 @@ namespace Jellyfin.Api.Auth
/// <inheritdoc />
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
- var authenticatedAttribute = new AuthenticatedAttribute();
+ var authenticatedAttribute = new AuthenticatedAttribute
+ {
+ IgnoreLegacyAuth = true
+ };
+
try
{
var user = _authService.Authenticate(Request, authenticatedAttribute);
if (user == null)
{
- return Task.FromResult(AuthenticateResult.Fail("Invalid user"));
+ return Task.FromResult(AuthenticateResult.NoResult());
+ // TODO return when legacy API is removed.
+ // Don't spam the log with "Invalid User"
+ // return Task.FromResult(AuthenticateResult.Fail("Invalid user"));
}
var claims = new[]