aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-04-20 18:10:38 +0100
committerGitHub <noreply@github.com>2021-04-20 18:10:38 +0100
commitf8b717e7c51a771b937312af3f1aa77e044b86ce (patch)
tree1de949627db1b7b033ea47e34ae5d7e2a8a70bd3 /Emby.Server.Implementations/HttpServer/WebSocketManager.cs
parent7848ea148438baf8929e1c2939e6979cb84aad1a (diff)
parent5a6e60b414046c274330479f7dfb9713eea20020 (diff)
Merge branch 'master' into ProfileMatch
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/WebSocketManager.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/WebSocketManager.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/HttpServer/WebSocketManager.cs b/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
index d6cf6233e..1bee1ac31 100644
--- a/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
+++ b/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
@@ -14,15 +14,18 @@ namespace Emby.Server.Implementations.HttpServer
public class WebSocketManager : IWebSocketManager
{
private readonly IWebSocketListener[] _webSocketListeners;
+ private readonly IAuthService _authService;
private readonly ILogger<WebSocketManager> _logger;
private readonly ILoggerFactory _loggerFactory;
public WebSocketManager(
+ IAuthService authService,
IEnumerable<IWebSocketListener> webSocketListeners,
ILogger<WebSocketManager> logger,
ILoggerFactory loggerFactory)
{
_webSocketListeners = webSocketListeners.ToArray();
+ _authService = authService;
_logger = logger;
_loggerFactory = loggerFactory;
}
@@ -30,6 +33,7 @@ namespace Emby.Server.Implementations.HttpServer
/// <inheritdoc />
public async Task WebSocketRequestHandler(HttpContext context)
{
+ _ = _authService.Authenticate(context.Request);
try
{
_logger.LogInformation("WS {IP} request", context.Connection.RemoteIpAddress);