From 848262831fe6281d448afd3bdcf802bbc643fbd1 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 13 Dec 2025 14:19:52 -0600 Subject: remove ISecurityService interface, add logging to api key handler --- src/slskd/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slskd/Program.cs') diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 288fa0e3..cb1961a2 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -768,7 +768,7 @@ namespace slskd var jwtSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(OptionsAtStartup.Web.Authentication.Jwt.Key)); services.AddSingleton(jwtSigningKey); - services.AddSingleton(); + services.AddSingleton(); if (!OptionsAtStartup.Web.Authentication.Disabled) { @@ -835,7 +835,7 @@ namespace slskd try { // check to see if the provided value is a valid API key - var service = services.BuildServiceProvider().GetRequiredService(); + var service = services.BuildServiceProvider().GetRequiredService(); var (name, role) = service.AuthenticateWithApiKey(token, callerIpAddress: context.HttpContext.Connection.RemoteIpAddress); // the API key is valid. create a new, short lived jwt for the key name and role -- cgit v1.2.3