aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-06 08:12:49 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-06 08:12:49 -0500
commit486d0a9768525c6f5d94ebc5b3c02cc9f7376b17 (patch)
tree9d90e5a09f62749a82977cd30a4c346a7ae71b6b /src
parentcd6874b3dd54c6b3e501439d308d591e4b2aada5 (diff)
downloadslskd-486d0a9768525c6f5d94ebc5b3c02cc9f7376b17.tar.gz
add policies for passthrough
Diffstat (limited to 'src')
-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 43d802b1..f4d25630 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -645,6 +645,12 @@ namespace slskd
policy.AuthenticationSchemes.Add(PassthroughAuthentication.AuthenticationScheme);
policy.RequireAuthenticatedUser();
});
+
+ options.AddPolicy(AuthPolicy.JwtOnly, policy =>
+ {
+ policy.AuthenticationSchemes.Add(PassthroughAuthentication.AuthenticationScheme);
+ policy.RequireAuthenticatedUser();
+ });
});
services.AddAuthentication(PassthroughAuthentication.AuthenticationScheme)