diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-10-17 09:26:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-17 09:26:14 +0100 |
| commit | d42bb515ce3692abd9295008872c7f9d62b47652 (patch) | |
| tree | 53743242f3b34aeeb24334572e50d67dc9f92727 /Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs | |
| parent | 75efb8f52d4234bfdefa2a0ac48f7261aa9ef58b (diff) | |
| parent | 86090ab1f65c66958c897cacd04221c537053eb3 (diff) | |
Merge branch 'master' into video-resolver
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs | 38 |
1 files changed, 38 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..5f32479e1 --- /dev/null +++ b/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs @@ -0,0 +1,38 @@ +#nullable enable + +using System.Threading.Tasks; +using Jellyfin.Data.Entities; +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 => false; + + /// <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(User user) + { + return true; + } + + /// <inheritdoc /> + public Task ChangePassword(User user, string newPassword) + { + return Task.CompletedTask; + } + } +} |
