aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-01-07 10:21:43 -0600
committerJP Dillingham <jp@dillingham.me>2023-01-07 10:21:43 -0600
commitb61c047068ec4c8b44ba058d6cb9ebb1cf6c4dff (patch)
tree890bb2d34cadaf48a3ecbc0ddfbedc2a14024b3c /src/slskd/Program.cs
parentd5eabb72a5c5a3aed06f0c4b8f66c853468b889b (diff)
downloadslskd-b61c047068ec4c8b44ba058d6cb9ebb1cf6c4dff.tar.gz
fix ApiKeyOnly policy issue
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index d0b670a2..28ef7279 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -696,6 +696,12 @@ namespace slskd
policy.RequireAuthenticatedUser();
});
+ options.AddPolicy(AuthPolicy.ApiKeyOnly, policy =>
+ {
+ policy.AuthenticationSchemes.Add(PassthroughAuthentication.AuthenticationScheme);
+ policy.RequireAuthenticatedUser();
+ });
+
options.AddPolicy(AuthPolicy.JwtOnly, policy =>
{
policy.AuthenticationSchemes.Add(PassthroughAuthentication.AuthenticationScheme);