Beispiel #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                //WorkstationDevelopment devEnv = new WorkstationDevelopment(@"D:\db\config.db");
                //devEnv.Setup();

                app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            IRuntimeConfigurationState runtimeConfigurationState = app.ApplicationServices.GetService <IRuntimeConfigurationState>();

            if (env.IsDevelopment())
            {
                runtimeConfigurationState.IsDevelopment = true;
            }


            app.UseAuthentication();

            app.UseStaticFiles();

            app.UseMiddleware(typeof(ErrorHandlingMiddleware));

            app.UseMvc();
        }
Beispiel #2
0
        //RoleManagementLogic roleManagement;

        public AuthenticationController(IdentityAuthenticationLogic authenticationLogic, IRuntimeConfigurationState runtimeConfigurationState, IConfigurationRepository configRepo, CertificateManagementLogic certificateManagementLogic)
        {
            this.authenticationLogic = authenticationLogic;
            this.http                       = new HttpResponseHandler(this);
            this.allowDevBypass             = true;
            this.runtimeConfigurationState  = runtimeConfigurationState;
            this.configurationRepository    = configRepo;
            this.certificateManagementLogic = certificateManagementLogic;
        }