mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
moved everything up a directory
This commit is contained in:
parent
448cd8d92e
commit
9a78f790a6
76 changed files with 0 additions and 0 deletions
38
RequestPlex.UI/Bootstrapper.cs
Normal file
38
RequestPlex.UI/Bootstrapper.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using Nancy;
|
||||
using Nancy.Authentication.Forms;
|
||||
using Nancy.Bootstrapper;
|
||||
using Nancy.TinyIoc;
|
||||
|
||||
using RequestPlex.Core;
|
||||
|
||||
using FormsAuthentication = Nancy.Authentication.Forms.FormsAuthentication;
|
||||
|
||||
namespace RequestPlex.UI
|
||||
{
|
||||
public class Bootstrapper : DefaultNancyBootstrapper
|
||||
{
|
||||
// The bootstrapper enables you to reconfigure the composition of the framework,
|
||||
// by overriding the various methods and properties.
|
||||
// For more information https://github.com/NancyFx/Nancy/wiki/Bootstrapper
|
||||
|
||||
protected override void ConfigureRequestContainer(TinyIoCContainer container, NancyContext context)
|
||||
{
|
||||
base.ConfigureRequestContainer(container, context);
|
||||
container.Register<IUserMapper, UserMapper>();
|
||||
}
|
||||
|
||||
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
|
||||
{
|
||||
base.ApplicationStartup(container, pipelines);
|
||||
|
||||
// Enable forms auth
|
||||
var formsAuthConfiguration = new FormsAuthenticationConfiguration
|
||||
{
|
||||
RedirectUrl = "~/login",
|
||||
UserMapper = container.Resolve<IUserMapper>()
|
||||
};
|
||||
|
||||
FormsAuthentication.Enable(pipelines, formsAuthConfiguration);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue