diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-02 17:37:51 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-02 17:37:51 -0500 |
| commit | ccc753b045c1869e4e5146122a2603c44db05945 (patch) | |
| tree | 4f362ba3544a66b3b818c133b82227040fd7b4e9 /src/slskd/Program.cs | |
| parent | a83c3829556c2c38b2367433953c7c731beaae95 (diff) | |
| download | slskd-ccc753b045c1869e4e5146122a2603c44db05945.tar.gz | |
add signalr support
Diffstat (limited to 'src/slskd/Program.cs')
| -rw-r--r-- | src/slskd/Program.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 4d9f6830..7b727308 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -70,6 +70,7 @@ namespace slskd using Soulseek; using Utility.CommandLine; using Utility.EnvironmentVariables; + using static slskd.Authentication.ApiKeyAuthenticationHandler; using IOFile = System.IO.File; /// <summary> @@ -612,7 +613,12 @@ namespace slskd }); services.AddAuthentication(ApiKeyAuthentication.AuthenticationScheme) - .AddScheme<AuthenticationSchemeOptions, ApiKeyAuthenticationHandler>(ApiKeyAuthentication.AuthenticationScheme, configureOptions: null); + .AddScheme<ApiKeyAuthenticationOptions, ApiKeyAuthenticationHandler>(ApiKeyAuthentication.AuthenticationScheme, options => + { + options.EnableSignalRSupport = true; + options.SignalRRoutePrefix = "/hub"; + options.Role = Role.Administrator; + }); } else { |
