diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-02 17:21:34 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-02 17:21:34 -0500 |
| commit | a83c3829556c2c38b2367433953c7c731beaae95 (patch) | |
| tree | e708fe7bc95c5ad95d094ee2471d3a734cb80df0 /src/slskd/Program.cs | |
| parent | c0a6cf3f2e5e49314d93749194ebf5ca37796b9a (diff) | |
| download | slskd-a83c3829556c2c38b2367433953c7c731beaae95.tar.gz | |
add handler
Diffstat (limited to 'src/slskd/Program.cs')
| -rw-r--r-- | src/slskd/Program.cs | 4 |
1 files changed, 4 insertions, 0 deletions
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<AuthenticationSchemeOptions, ApiKeyAuthenticationHandler>(ApiKeyAuthentication.AuthenticationScheme, configureOptions: null); } else { |
