aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs
diff options
context:
space:
mode:
authorferferga <ferferga.fer@gmail.com>2020-10-19 17:28:07 +0200
committerferferga <ferferga.fer@gmail.com>2020-10-19 17:28:07 +0200
commit9fd01fade6ac971ba72a2e7dd54e2295f23839bc (patch)
tree20a5ff4a1621e765fc93c0e53b149edb61ff3654 /Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs
parentba03ed65fe64b724b3e8b5b94b9cbe1075c61da2 (diff)
parent49ac4c4044b1777dc3a25544aead7b0b15b953e8 (diff)
Remove "download images in advance" option
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs')
-rw-r--r--Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs38
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;
+ }
+ }
+}