From a83c3829556c2c38b2367433953c7c731beaae95 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 2 Oct 2022 17:21:34 -0500 Subject: add handler --- src/slskd/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/slskd/Program.cs') 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(ApiKeyAuthentication.AuthenticationScheme, configureOptions: null); } else { -- cgit v1.2.3