aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Library')
-rw-r--r--Emby.Server.Implementations/Library/ConnectManager.cs46
-rw-r--r--Emby.Server.Implementations/Library/UserManager.cs38
2 files changed, 47 insertions, 37 deletions
diff --git a/Emby.Server.Implementations/Library/ConnectManager.cs b/Emby.Server.Implementations/Library/ConnectManager.cs
new file mode 100644
index 000000000..5df45aa44
--- /dev/null
+++ b/Emby.Server.Implementations/Library/ConnectManager.cs
@@ -0,0 +1,46 @@
+using MediaBrowser.Common.Events;
+using MediaBrowser.Common.Net;
+using MediaBrowser.Controller;
+using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Controller.Connect;
+using MediaBrowser.Controller.Drawing;
+using MediaBrowser.Controller.Dto;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.Net;
+using MediaBrowser.Controller.Persistence;
+using MediaBrowser.Controller.Providers;
+using MediaBrowser.Model.Configuration;
+using MediaBrowser.Model.Connect;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.Events;
+using MediaBrowser.Model.Logging;
+using MediaBrowser.Model.Serialization;
+using MediaBrowser.Model.Users;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Model.Cryptography;
+using MediaBrowser.Model.IO;
+using MediaBrowser.Controller.Authentication;
+using MediaBrowser.Controller.Security;
+using MediaBrowser.Controller.Devices;
+using MediaBrowser.Controller.Session;
+using MediaBrowser.Controller.Plugins;
+
+namespace Emby.Server.Implementations.Library
+{
+ public class ConnectManager : IConnectManager
+ {
+ public ConnectManager()
+ {
+ }
+
+ }
+}
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index b13a255aa..a13e8248f 100644
--- a/Emby.Server.Implementations/Library/UserManager.cs
+++ b/Emby.Server.Implementations/Library/UserManager.cs
@@ -272,20 +272,6 @@ namespace Emby.Server.Implementations.Library
authenticationProvider = authResult.Item1;
success = authResult.Item2;
}
-
- // Maybe user accidently entered connect credentials. let's be flexible
- if (!success && user.ConnectLinkType.HasValue && !string.IsNullOrWhiteSpace(user.ConnectUserName))
- {
- try
- {
- await _connectFactory().Authenticate(user.ConnectUserName, password).ConfigureAwait(false);
- success = true;
- }
- catch
- {
-
- }
- }
}
else
{
@@ -318,23 +304,6 @@ namespace Emby.Server.Implementations.Library
}
}
- // Try originally entered username
- if (!success && (user == null || !string.Equals(user.ConnectUserName, username, StringComparison.OrdinalIgnoreCase)))
- {
- try
- {
- var connectAuthResult = await _connectFactory().Authenticate(username, password).ConfigureAwait(false);
-
- user = Users.FirstOrDefault(i => string.Equals(i.ConnectUserId, connectAuthResult.User.Id, StringComparison.OrdinalIgnoreCase));
-
- success = user != null;
- }
- catch
- {
-
- }
- }
-
if (user == null)
{
throw new SecurityException("Invalid username or password entered.");
@@ -777,11 +746,6 @@ namespace Emby.Server.Implementations.Library
throw new ArgumentNullException("user");
}
- if (user.ConnectLinkType.HasValue)
- {
- await _connectFactory().RemoveConnect(user).ConfigureAwait(false);
- }
-
var allUsers = Users.ToList();
if (allUsers.FirstOrDefault(u => u.Id == user.Id) == null)
@@ -1277,4 +1241,4 @@ namespace Emby.Server.Implementations.Library
}
}
-} \ No newline at end of file
+}