Remove EasyPassword from Authentication providers

This commit is contained in:
crobibero 2020-06-07 14:47:08 -06:00
parent 98142613e8
commit 68e1ecaaf9
3 changed files with 0 additions and 38 deletions

View File

@ -111,29 +111,5 @@ namespace Jellyfin.Server.Implementations.Users
return Task.CompletedTask;
}
/// <inheritdoc />
public void ChangeEasyPassword(User user, string newPassword, string newPasswordHash)
{
if (newPassword != null)
{
newPasswordHash = _cryptographyProvider.CreatePasswordHash(newPassword).ToString();
}
if (string.IsNullOrWhiteSpace(newPasswordHash))
{
throw new ArgumentNullException(nameof(newPasswordHash));
}
user.EasyPassword = newPasswordHash;
}
/// <inheritdoc />
public string GetEasyPasswordHash(User user)
{
return string.IsNullOrEmpty(user.EasyPassword)
? null
: Hex.Encode(PasswordHash.Parse(user.EasyPassword).Hash);
}
}
}

View File

@ -32,17 +32,5 @@ namespace Jellyfin.Server.Implementations.Users
{
return Task.CompletedTask;
}
/// <inheritdoc />
public void ChangeEasyPassword(User user, string newPassword, string newPasswordHash)
{
// Nothing here
}
/// <inheritdoc />
public string GetEasyPasswordHash(User user)
{
return string.Empty;
}
}
}

View File

@ -11,8 +11,6 @@ namespace MediaBrowser.Controller.Authentication
Task<ProviderAuthenticationResult> Authenticate(string username, string password);
bool HasPassword(User user);
Task ChangePassword(User user, string newPassword);
void ChangeEasyPassword(User user, string newPassword, string newPasswordHash);
string GetEasyPasswordHash(User user);
}
public interface IRequiresResolvedUser