< Summary - Jellyfin

Information
Class: Jellyfin.Server.Implementations.Users.InvalidAuthProvider
Assembly: Jellyfin.Server.Implementations
File(s): /srv/git/jellyfin/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs
Line coverage
20%
Covered lines: 1
Uncovered lines: 4
Coverable lines: 5
Total lines: 36
Line coverage: 20%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%210%
get_IsEnabled()100%11100%
Authenticate(...)100%210%
HasPassword(...)100%210%
ChangePassword(...)100%210%

File(s)

/srv/git/jellyfin/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs

#LineLine coverage
 1using System.Threading.Tasks;
 2using Jellyfin.Data.Entities;
 3using MediaBrowser.Controller.Authentication;
 4
 5namespace Jellyfin.Server.Implementations.Users
 6{
 7    /// <summary>
 8    /// An invalid authentication provider.
 9    /// </summary>
 10    public class InvalidAuthProvider : IAuthenticationProvider
 11    {
 12        /// <inheritdoc />
 013        public string Name => "InvalidOrMissingAuthenticationProvider";
 14
 15        /// <inheritdoc />
 6216        public bool IsEnabled => false;
 17
 18        /// <inheritdoc />
 19        public Task<ProviderAuthenticationResult> Authenticate(string username, string password)
 20        {
 021            throw new AuthenticationException("User Account cannot login with this provider. The Normal provider for thi
 22        }
 23
 24        /// <inheritdoc />
 25        public bool HasPassword(User user)
 26        {
 027            return true;
 28        }
 29
 30        /// <inheritdoc />
 31        public Task ChangePassword(User user, string newPassword)
 32        {
 033            return Task.CompletedTask;
 34        }
 35    }
 36}