diff options
| author | crobibero <cody@robibe.ro> | 2020-12-01 14:47:42 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-12-01 14:47:42 -0700 |
| commit | cd459c51f3d8a6a46a802759df1620ec43e5d2ae (patch) | |
| tree | d43a8609b771876845f2a86daffd2ff11db1fa1e /Jellyfin.Api/Auth/CustomAuthenticationHandler.cs | |
| parent | 38b3b4f8672373c8e1ac2e509d759fe07d179146 (diff) | |
Return NoResult only when request doesn't have a token.
Diffstat (limited to 'Jellyfin.Api/Auth/CustomAuthenticationHandler.cs')
| -rw-r--r-- | Jellyfin.Api/Auth/CustomAuthenticationHandler.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs index f98d5c11a..c56233794 100644 --- a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs +++ b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs @@ -1,5 +1,4 @@ using System.Globalization; -using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; @@ -8,7 +7,6 @@ using Jellyfin.Data.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -79,8 +77,7 @@ namespace Jellyfin.Api.Auth } catch (SecurityException ex) { - _logger.LogDebug(ex, "Error authenticating with {Handler}", nameof(CustomAuthenticationHandler)); - return Task.FromResult(AuthenticateResult.NoResult()); + return Task.FromResult(AuthenticateResult.Fail(ex)); } } } |
