aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-06-21 19:00:24 -0400
committerPatrick Barron <barronpm@gmail.com>2021-06-21 19:00:24 -0400
commit784f29f75387d4a98b20103a59d94dc1994516d1 (patch)
tree9053cfc2f6675ab271f1ee820318421cab713a58 /Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
parent544e0593957e13a7597971b702379e7f4f6e9b3d (diff)
Use named tuple for QuickConnect
Diffstat (limited to 'Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs')
-rw-r--r--Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs b/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
index b32c70eb9..783185e7d 100644
--- a/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
+++ b/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
@@ -24,7 +24,7 @@ namespace Emby.Server.Implementations.QuickConnect
{
private readonly RNGCryptoServiceProvider _rng = new ();
private readonly ConcurrentDictionary<string, QuickConnectResult> _currentRequests = new ();
- private readonly ConcurrentDictionary<string, (string, Guid)> _quickConnectTokens = new ();
+ private readonly ConcurrentDictionary<string, (string Token, Guid UserId)> _quickConnectTokens = new ();
private readonly IServerConfigurationManager _config;
private readonly ILogger<QuickConnectManager> _logger;
@@ -137,7 +137,7 @@ namespace Emby.Server.Implementations.QuickConnect
throw new SecurityException("Unknown quick connect token");
}
- request.UserId = entry.Item2;
+ request.UserId = entry.UserId;
_quickConnectTokens.Remove(token, out _);
_sessionManager.AuthenticateQuickConnect(request, token);
@@ -195,7 +195,7 @@ namespace Emby.Server.Implementations.QuickConnect
public int DeleteAllDevices(Guid user)
{
var tokens = _quickConnectTokens
- .Where(entry => entry.Value.Item1.StartsWith(TokenName, StringComparison.Ordinal) && entry.Value.Item2 == user)
+ .Where(entry => entry.Value.Token.StartsWith(TokenName, StringComparison.Ordinal) && entry.Value.UserId == user)
.ToList();
var removed = 0;