diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-11-13 07:03:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-13 07:03:40 -0700 |
| commit | 8868b34d78bdb34f4c47aa4b8e81a1a3cd699ded (patch) | |
| tree | e0b6cb8c274540ba139cd4131edaa190c3bab4bc | |
| parent | 01a1209f0e37592aaf79875ec4ebbdd35b05749e (diff) | |
| parent | 8ae53161989e0d5ba674b7a5efdf2a83a9867ead (diff) | |
Merge pull request #6822 from NickSica/master
| -rw-r--r-- | Jellyfin.Server.Implementations/Security/AuthorizationContext.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs index 3ab043c64..d59d36e88 100644 --- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs +++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs @@ -185,9 +185,21 @@ 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; } } |
