mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 01:05:19 +03:00
Remove Emby.Server.Connect
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user