Esempio n. 1
0
 private static void ConfigureNancy(IAppBuilder app, TheBenchSettings configuration)
 {
     // https://github.com/NancyFx/Nancy/wiki/Hosting-nancy-with-owin
     app.UseNancy(new NancyOptions
     {
         Bootstrapper = new Bootstrapper(configuration),
     });
 }
Esempio n. 2
0
 private static void ConfigureNancy(IAppBuilder app, TheBenchSettings configuration)
 {
     // https://github.com/NancyFx/Nancy/wiki/Hosting-nancy-with-owin
     app.UseNancy(new NancyOptions
     {
         Bootstrapper = new Bootstrapper(configuration),
     });
 }
Esempio n. 3
0
 private static void ConfigureAuthentication(IAppBuilder app, TheBenchSettings configuration)
 {
     app.UseCookieAuthentication(new CookieAuthenticationOptions
     {
         AuthenticationType = configuration.Authentication.AuthenticationType,
         CookieHttpOnly = configuration.Authentication.CookieHttpOnly,
         CookieName = configuration.Authentication.CookieName,
         CookieSecure = configuration.Authentication.CookieSecure,
         ExpireTimeSpan = configuration.Authentication.AuthenticationCookieExpireTimeSpan,
         LoginPath = configuration.Authentication.LoginPath,
         LogoutPath = configuration.Authentication.LogoutPath,
         ReturnUrlParameter = configuration.Authentication.ReturnUrl,
         SlidingExpiration = configuration.Authentication.EnableSlidingExpiration
     });
 }
Esempio n. 4
0
 private static void ConfigureAuthentication(IAppBuilder app, TheBenchSettings configuration)
 {
     app.UseCookieAuthentication(new CookieAuthenticationOptions
     {
         AuthenticationType = configuration.Authentication.AuthenticationType,
         CookieHttpOnly     = configuration.Authentication.CookieHttpOnly,
         CookieName         = configuration.Authentication.CookieName,
         CookieSecure       = configuration.Authentication.CookieSecure,
         ExpireTimeSpan     = configuration.Authentication.AuthenticationCookieExpireTimeSpan,
         LoginPath          = configuration.Authentication.LoginPath,
         LogoutPath         = configuration.Authentication.LogoutPath,
         ReturnUrlParameter = configuration.Authentication.ReturnUrl,
         SlidingExpiration  = configuration.Authentication.EnableSlidingExpiration
     });
 }
Esempio n. 5
0
        public void Configuration(IAppBuilder app)
        {
            // So that squishit works
            //Directory.SetCurrentDirectory(AppDomain.CurrentDomain.SetupInformation.ApplicationBase);

            var configuration = new TheBenchSettings();

            if (configuration.General.RequireHttps)
                app.Use(typeof(RequireHttpsHandler));

            // TODO: Read Docs
            //app.UseErrorPage();

            ConfigureAuthentication(app, configuration);
            ConfigureStaticContent(app);
            ConfigureNancy(app, configuration);

            // http://katanaproject.codeplex.com/discussions/470920
            app.UseStageMarker(PipelineStage.MapHandler);
        }
Esempio n. 6
0
        public void Configuration(IAppBuilder app)
        {
            // So that squishit works
            //Directory.SetCurrentDirectory(AppDomain.CurrentDomain.SetupInformation.ApplicationBase);

            var configuration = new TheBenchSettings();

            if (configuration.General.RequireHttps)
            {
                app.Use(typeof(RequireHttpsHandler));
            }

            // TODO: Read Docs
            //app.UseErrorPage();

            ConfigureAuthentication(app, configuration);
            ConfigureStaticContent(app);
            ConfigureNancy(app, configuration);

            // http://katanaproject.codeplex.com/discussions/470920
            app.UseStageMarker(PipelineStage.MapHandler);
        }
Esempio n. 7
0
 public Bootstrapper(TheBenchSettings configuration)
 {
     _configuration = configuration;
 }
Esempio n. 8
0
 public Bootstrapper(TheBenchSettings configuration)
 {
     _configuration = configuration;
 }