diff options
| author | Bond-009 <bond.009@outlook.com> | 2025-02-05 01:10:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-04 17:10:39 -0700 |
| commit | 00b66a06eac4d1331d59a6a9b7de3e99088ebaa9 (patch) | |
| tree | d97628d72afa37d4e9a314117f697c035485a94c /Jellyfin.Server.Implementations/Security | |
| parent | 2de04cb07c3b5f02fb5d5d9892541614e990cbe0 (diff) | |
Enable nullable for AuthorizationInfo (#13485)
Diffstat (limited to 'Jellyfin.Server.Implementations/Security')
| -rw-r--r-- | Jellyfin.Server.Implementations/Security/AuthorizationContext.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs index ae9040489..9e225393c 100644 --- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs +++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs @@ -116,17 +116,15 @@ namespace Jellyfin.Server.Implementations.Security DeviceId = deviceId, Version = version, Token = token, - IsAuthenticated = false, - HasToken = false + IsAuthenticated = false }; - if (string.IsNullOrWhiteSpace(token)) + if (!authInfo.HasToken) { // Request doesn't contain a token. return authInfo; } - authInfo.HasToken = true; var dbContext = await _jellyfinDbProvider.CreateDbContextAsync().ConfigureAwait(false); await using (dbContext.ConfigureAwait(false)) { |
