From b61c047068ec4c8b44ba058d6cb9ebb1cf6c4dff Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 7 Jan 2023 10:21:43 -0600 Subject: fix ApiKeyOnly policy issue --- src/slskd/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/slskd/Program.cs') 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); -- cgit v1.2.3