aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-12-13 14:19:52 -0600
committerJP Dillingham <jp@dillingham.me>2025-12-13 14:19:52 -0600
commit848262831fe6281d448afd3bdcf802bbc643fbd1 (patch)
tree95e8bbb094d27f82637a0f317af3b26d5bb2f11c /src/slskd/Program.cs
parent942eeb1eeb535dbaa99e3701ffea39cadcabc4db (diff)
downloadslskd-848262831fe6281d448afd3bdcf802bbc643fbd1.tar.gz
remove ISecurityService interface, add logging to api key handler
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs4
1 files changed, 2 insertions, 2 deletions
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<ISecurityService, SecurityService>();
+ services.AddSingleton<SecurityService>();
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<ISecurityService>();
+ var service = services.BuildServiceProvider().GetRequiredService<SecurityService>();
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