diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2020-12-04 13:50:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-04 13:50:44 +0100 |
| commit | dca3f62ff85ba62af95831848718e9764d163306 (patch) | |
| tree | 5be2338b7ec18013fb18feb3325d3228b3e5da59 /Jellyfin.Api/Auth/CustomAuthenticationHandler.cs | |
| parent | eed1a40b1935e00e04f6b27c7d307bf110b83b31 (diff) | |
| parent | 9afd19b06e025992ee5159a08d7af8bd736a828e (diff) | |
Merge branch 'master' into PlugsVersionNumberFix
Diffstat (limited to 'Jellyfin.Api/Auth/CustomAuthenticationHandler.cs')
| -rw-r--r-- | Jellyfin.Api/Auth/CustomAuthenticationHandler.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs index 27a1f61be..c56233794 100644 --- a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs +++ b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs @@ -18,6 +18,7 @@ namespace Jellyfin.Api.Auth public class CustomAuthenticationHandler : AuthenticationHandler<AuthenticationSchemeOptions> { private readonly IAuthService _authService; + private readonly ILogger<CustomAuthenticationHandler> _logger; /// <summary> /// Initializes a new instance of the <see cref="CustomAuthenticationHandler" /> class. @@ -35,6 +36,7 @@ namespace Jellyfin.Api.Auth ISystemClock clock) : base(options, logger, encoder, clock) { _authService = authService; + _logger = logger.CreateLogger<CustomAuthenticationHandler>(); } /// <inheritdoc /> @@ -70,7 +72,8 @@ namespace Jellyfin.Api.Auth } catch (AuthenticationException ex) { - return Task.FromResult(AuthenticateResult.Fail(ex)); + _logger.LogDebug(ex, "Error authenticating with {Handler}", nameof(CustomAuthenticationHandler)); + return Task.FromResult(AuthenticateResult.NoResult()); } catch (SecurityException ex) { |
