From 4b2c40f71706d0b8e77925cb0103ae7b9fc65503 Mon Sep 17 00:00:00 2001 From: NickSica Date: Thu, 11 Nov 2021 00:43:43 -0500 Subject: [PATCH 1/3] Fixes Ombi auth through Jellyfin --- .../Security/AuthorizationContext.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs index 3ab043c64..efa7e3b5c 100644 --- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs +++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs @@ -185,9 +185,20 @@ namespace Jellyfin.Server.Implementations.Security authInfo.IsAuthenticated = true; authInfo.Client = key.Name; authInfo.Token = key.AccessToken; - authInfo.DeviceId = string.Empty; - authInfo.Device = string.Empty; - authInfo.Version = string.Empty; + if(string.IsNullOrWhiteSpace(authInfo.DeviceId)) + { + authInfo.DeviceId = string.Empty; + } + + if(string.IsNullOrWhiteSpace(authInfo.Device)) + { + authInfo.Device = string.Empty; + } + + if(string.IsNullOrWhiteSpace(authInfo.Version)) + { + authInfo.Version = string.Empty; + } authInfo.IsApiKey = true; } } From c5e42ddcc6a107b094eb0316163f06f8428857e3 Mon Sep 17 00:00:00 2001 From: Nicholas Sica Date: Thu, 11 Nov 2021 11:03:27 -0500 Subject: [PATCH 2/3] Fix Ombi auth through Jellyfin Co-authored-by: Cody Robibero --- Jellyfin.Server.Implementations/Security/AuthorizationContext.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs index efa7e3b5c..d648f9504 100644 --- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs +++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs @@ -199,6 +199,7 @@ namespace Jellyfin.Server.Implementations.Security { authInfo.Version = string.Empty; } + authInfo.IsApiKey = true; } } From 8ae53161989e0d5ba674b7a5efdf2a83a9867ead Mon Sep 17 00:00:00 2001 From: Nicholas Sica Date: Fri, 12 Nov 2021 16:23:58 -0500 Subject: [PATCH 3/3] Fix Ombi auth through Jellyfin --- .../Security/AuthorizationContext.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs index d648f9504..d59d36e88 100644 --- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs +++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs @@ -185,17 +185,17 @@ namespace Jellyfin.Server.Implementations.Security authInfo.IsAuthenticated = true; authInfo.Client = key.Name; authInfo.Token = key.AccessToken; - if(string.IsNullOrWhiteSpace(authInfo.DeviceId)) + if (string.IsNullOrWhiteSpace(authInfo.DeviceId)) { authInfo.DeviceId = string.Empty; } - if(string.IsNullOrWhiteSpace(authInfo.Device)) + if (string.IsNullOrWhiteSpace(authInfo.Device)) { authInfo.Device = string.Empty; } - if(string.IsNullOrWhiteSpace(authInfo.Version)) + if (string.IsNullOrWhiteSpace(authInfo.Version)) { authInfo.Version = string.Empty; }