aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-03 07:35:27 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-03 07:35:27 -0500
commit56567464a5955ce6be66769ddec4acea90ac36b5 (patch)
tree9f50ff24d89ed4477b3f7c3790760191c19bf519 /src
parent6f75ffa2ebf07999bd90396ad8ee3b09146d7321 (diff)
downloadslskd-56567464a5955ce6be66769ddec4acea90ac36b5.tar.gz
docs
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Common/Authentication/ApiKeyAuthentication.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slskd/Common/Authentication/ApiKeyAuthentication.cs b/src/slskd/Common/Authentication/ApiKeyAuthentication.cs
index 08cfa3b6..8baae3f9 100644
--- a/src/slskd/Common/Authentication/ApiKeyAuthentication.cs
+++ b/src/slskd/Common/Authentication/ApiKeyAuthentication.cs
@@ -85,6 +85,9 @@ namespace slskd.Authentication
}
else if (apiKeyOptions.EnableSignalRSupport && Request.Path.StartsWithSegments(apiKeyOptions.SignalRRoutePrefix) && Request.Query.ContainsKey("access_token"))
{
+ // assign the request token from the access_token query parameter
+ // but only if the destination is a SignalR hub
+ // https://docs.microsoft.com/en-us/aspnet/core/signalr/authn-and-authz?view=aspnetcore-5.0
key = Request.Query["access_token"];
}
else