From e03e2c46d65dfc0e881d6993b22f1c02eda788ff Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Wed, 22 May 2013 19:12:36 -0700 Subject: [PATCH] fixed authentication. at least locally. need to test remote. --- NzbDrone.Api/NancyBootstrapper.cs | 6 ++---- NzbDrone.Api/NzbDrone.Api.csproj | 3 ++- NzbDrone.Api/NzbDroneApiModule.cs | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NzbDrone.Api/NancyBootstrapper.cs b/NzbDrone.Api/NancyBootstrapper.cs index cded8b292..2de87f802 100644 --- a/NzbDrone.Api/NancyBootstrapper.cs +++ b/NzbDrone.Api/NancyBootstrapper.cs @@ -5,6 +5,7 @@ using Nancy.Bootstrapper; using Nancy.Conventions; using Nancy.Diagnostics; +using NzbDrone.Api.Authentication; using NzbDrone.Api.ErrorManagement; using NzbDrone.Api.Extensions; using NzbDrone.Api.Frontend; @@ -36,12 +37,9 @@ protected override void ApplicationStartup(TinyIoCContainer container, IPipeline AutomapperBootstraper.InitializeAutomapper(); container.Resolve().Register(); - + container.Resolve().Register(pipelines); container.Resolve().PublishEvent(new ApplicationStartedEvent()); - pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration( - container.Resolve(), - "NzbDrone")); ApplicationPipelines.OnError.AddItemToEndOfPipeline(container.Resolve().HandleException); } diff --git a/NzbDrone.Api/NzbDrone.Api.csproj b/NzbDrone.Api/NzbDrone.Api.csproj index 54785dcc3..9e1bfab6c 100644 --- a/NzbDrone.Api/NzbDrone.Api.csproj +++ b/NzbDrone.Api/NzbDrone.Api.csproj @@ -89,7 +89,8 @@ - + + diff --git a/NzbDrone.Api/NzbDroneApiModule.cs b/NzbDrone.Api/NzbDroneApiModule.cs index 342c96d29..589d4ffee 100644 --- a/NzbDrone.Api/NzbDroneApiModule.cs +++ b/NzbDrone.Api/NzbDroneApiModule.cs @@ -8,7 +8,6 @@ public abstract class NzbDroneApiModule : NancyModule protected NzbDroneApiModule(string resource) : base("/api/" + resource.Trim('/')) { - this.RequiresAuthentication(); Options["/"] = x => new Response(); } }