1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-19 21:46:50 -04:00

New: Remove Basic Auth

(cherry picked from commit 0f9e063e2146812f6e963363eee70a524612f354)
This commit is contained in:
Mark McDowall
2025-02-16 19:36:02 -08:00
committed by bakerboy448
parent cdc6a6dd27
commit 41fa0de230
6 changed files with 19 additions and 97 deletions
@@ -18,11 +18,6 @@ namespace Radarr.Http.Authentication
return authenticationBuilder.AddScheme<ApiKeyAuthenticationOptions, ApiKeyAuthenticationHandler>(name, options);
}
public static AuthenticationBuilder AddBasic(this AuthenticationBuilder authenticationBuilder, string name)
{
return authenticationBuilder.AddScheme<AuthenticationSchemeOptions, BasicAuthenticationHandler>(name, options => { });
}
public static AuthenticationBuilder AddNone(this AuthenticationBuilder authenticationBuilder, string name)
{
return authenticationBuilder.AddScheme<AuthenticationSchemeOptions, NoAuthenticationHandler>(name, options => { });
@@ -54,7 +49,9 @@ namespace Radarr.Http.Authentication
return services.AddAuthentication()
.AddNone(AuthenticationType.None.ToString())
.AddExternal(AuthenticationType.External.ToString())
.AddBasic(AuthenticationType.Basic.ToString())
#pragma warning disable CS0618 // Type or member is obsolete
.AddCookie(AuthenticationType.Basic.ToString())
#pragma warning restore CS0618 // Type or member is obsolete
.AddCookie(AuthenticationType.Forms.ToString())
.AddApiKey("API", options =>
{