using System.Threading.Tasks;
using MediaBrowser.Controller.Authentication;
namespace Jellyfin.Server.Implementations.Users
{
///
/// An invalid authentication provider.
///
public class InvalidAuthProvider : IAuthenticationProvider
{
///
public string Name => "InvalidOrMissingAuthenticationProvider";
///
public bool IsEnabled => true;
///
public Task Authenticate(string username, string password)
{
throw new AuthenticationException("User Account cannot login with this provider. The Normal provider for this user cannot be found");
}
///
public bool HasPassword(Data.Entities.User user)
{
return true;
}
///
public Task ChangePassword(Data.Entities.User user, string newPassword)
{
return Task.CompletedTask;
}
///
public void ChangeEasyPassword(Data.Entities.User user, string newPassword, string newPasswordHash)
{
// Nothing here
}
///
public string GetEasyPasswordHash(Data.Entities.User user)
{
return string.Empty;
}
}
}