From 00b66a06eac4d1331d59a6a9b7de3e99088ebaa9 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Wed, 5 Feb 2025 01:10:39 +0100 Subject: Enable nullable for AuthorizationInfo (#13485) --- Jellyfin.Server.Implementations/Security/AuthorizationContext.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Jellyfin.Server.Implementations/Security') 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)) { -- cgit v1.2.3