aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
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);