aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-09-03 16:17:02 +0200
committerGitHub <noreply@github.com>2021-09-03 16:17:02 +0200
commit79e51b7fa20dbcb013ddd335fa829f83802dae71 (patch)
tree046d44c729b1f6b3a2370c78403517daa0a174d6 /Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
parent2f360151c266ff0885589338fdcdebd2a0c57fae (diff)
parentbfb37a9ed9989f63ee8b00f41f4efef7a92fc157 (diff)
Merge pull request #6475 from crobibero/warn-259810
Remove more and more warnings
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index b2625a68c..badc6ce6c 100644
--- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -74,6 +74,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
auth.TryGetValue("Token", out token);
}
+#pragma warning disable CA1508 // string.IsNullOrEmpty(token) is always false.
if (string.IsNullOrEmpty(token))
{
token = headers["X-Emby-Token"];
@@ -111,6 +112,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
// Request doesn't contain a token.
return authInfo;
}
+#pragma warning restore CA1508
authInfo.HasToken = true;
var result = _authRepo.Get(new AuthenticationInfoQuery