aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Security
diff options
context:
space:
mode:
authorNickSica <njs82@drexel.edu>2021-11-11 00:43:43 -0500
committerNickSica <njs82@drexel.edu>2021-11-11 00:43:43 -0500
commit4b2c40f71706d0b8e77925cb0103ae7b9fc65503 (patch)
tree2fb90e381f05866d41ea4f4d84f07f37aaf60514 /Jellyfin.Server.Implementations/Security
parent4c88bf3fe3ef2e02632655acfcb8db18fd9f7d82 (diff)
Fixes Ombi auth through Jellyfin
Diffstat (limited to 'Jellyfin.Server.Implementations/Security')
-rw-r--r--Jellyfin.Server.Implementations/Security/AuthorizationContext.cs17
1 files 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;
}
}