aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-02 17:21:34 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-02 17:21:34 -0500
commita83c3829556c2c38b2367433953c7c731beaae95 (patch)
treee708fe7bc95c5ad95d094ee2471d3a734cb80df0 /src/slskd/Program.cs
parentc0a6cf3f2e5e49314d93749194ebf5ca37796b9a (diff)
downloadslskd-a83c3829556c2c38b2367433953c7c731beaae95.tar.gz
add handler
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 2d41ee93..4d9f6830 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -32,6 +32,7 @@ namespace slskd
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
+ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
@@ -609,6 +610,9 @@ namespace slskd
},
};
});
+
+ services.AddAuthentication(ApiKeyAuthentication.AuthenticationScheme)
+ .AddScheme<AuthenticationSchemeOptions, ApiKeyAuthenticationHandler>(ApiKeyAuthentication.AuthenticationScheme, configureOptions: null);
}
else
{