aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/WebSocketManager.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-05-18 18:09:46 -0400
committerPatrick Barron <barronpm@gmail.com>2021-05-18 18:09:46 -0400
commita225f3479600b511b3a53cfba6d59f6bc3210821 (patch)
treed310a84faaa98851407f990cce7b4f6caf725af3 /Emby.Server.Implementations/HttpServer/WebSocketManager.cs
parent12fa5c0c41c255f4d74d56eacaa38ed2da420d6f (diff)
parent88a7875a2739bef91f1d7216c5ebd89b4c267911 (diff)
Merge branch 'master' into authenticationdb-efcore
# Conflicts: # Jellyfin.Api/Helpers/RequestHelpers.cs
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);