Ver Fonte

Remove EasyPassword from Authentication providers

crobibero há 5 anos atrás
pai
commit
68e1ecaaf9

+ 0 - 24
Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs

@@ -111,29 +111,5 @@ namespace Jellyfin.Server.Implementations.Users
 
 
             return Task.CompletedTask;
             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);
-        }
     }
     }
 }
 }

+ 0 - 12
Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs

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

+ 0 - 2
MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs

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