mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 01:02:05 +00:00
fixed authentication. at least locally. need to test remote.
This commit is contained in:
parent
e538593c61
commit
e03e2c46d6
3 changed files with 4 additions and 6 deletions
|
@ -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<DatabaseTarget>().Register();
|
||||
|
||||
container.Resolve<IEnableBasicAuthInNancy>().Register(pipelines);
|
||||
container.Resolve<IMessageAggregator>().PublishEvent(new ApplicationStartedEvent());
|
||||
|
||||
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(
|
||||
container.Resolve<IUserValidator>(),
|
||||
"NzbDrone"));
|
||||
|
||||
ApplicationPipelines.OnError.AddItemToEndOfPipeline(container.Resolve<NzbDroneErrorPipeline>().HandleException);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,8 @@
|
|||
<Reference Include="Microsoft.CSharp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Authentication\AuthenticationValidator.cs" />
|
||||
<Compile Include="Authentication\AuthenticationService.cs" />
|
||||
<Compile Include="Authentication\EnableBasicAuthInNancy.cs" />
|
||||
<Compile Include="Authentication\NzbDroneUser.cs" />
|
||||
<Compile Include="AutomapperBootstraper.cs" />
|
||||
<Compile Include="Calendar\CalendarModule.cs" />
|
||||
|
|
|
@ -8,7 +8,6 @@ public abstract class NzbDroneApiModule : NancyModule
|
|||
protected NzbDroneApiModule(string resource)
|
||||
: base("/api/" + resource.Trim('/'))
|
||||
{
|
||||
this.RequiresAuthentication();
|
||||
Options["/"] = x => new Response();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue