diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-05-15 17:24:01 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-05-20 10:04:00 -0400 |
| commit | 3eeb6576d8425c8d2917f861b466dfa36e3994df (patch) | |
| tree | b725c19d776a1ee11f3cc7686a01069c9d443e48 /Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs | |
| parent | aca7e221d811040bdb14da6390bbd16c5f7db785 (diff) | |
Migrate User DB to EF Core
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs b/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs new file mode 100644 index 000000000..e430808bf --- /dev/null +++ b/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs @@ -0,0 +1,47 @@ +using System.Threading.Tasks; +using MediaBrowser.Controller.Authentication; + +namespace Jellyfin.Server.Implementations.Users +{ + /// <summary> + /// An invalid authentication provider. + /// </summary> + public class InvalidAuthProvider : IAuthenticationProvider + { + /// <inheritdoc /> + public string Name => "InvalidOrMissingAuthenticationProvider"; + + /// <inheritdoc /> + public bool IsEnabled => true; + + /// <inheritdoc /> + public Task<ProviderAuthenticationResult> Authenticate(string username, string password) + { + throw new AuthenticationException("User Account cannot login with this provider. The Normal provider for this user cannot be found"); + } + + /// <inheritdoc /> + public bool HasPassword(Data.Entities.User user) + { + return true; + } + + /// <inheritdoc /> + public Task ChangePassword(Data.Entities.User user, string newPassword) + { + return Task.CompletedTask; + } + + /// <inheritdoc /> + public void ChangeEasyPassword(Data.Entities.User user, string newPassword, string newPasswordHash) + { + // Nothing here + } + + /// <inheritdoc /> + public string GetEasyPasswordHash(Data.Entities.User user) + { + return string.Empty; + } + } +} |
