public void Configure( IApplicationBuilder app, IHostingEnvironment env, LifetimeManager lifetimeManager, InterpreterManager interpreterManager, SecurityManager securityManager ) { lifetimeManager.Initialize(); interpreterManager.Initialize(); app.UseWebSockets(new WebSocketOptions { ReplaceFeature = true, KeepAliveInterval = TimeSpan.FromMilliseconds(1000000000), ReceiveBufferSize = 0x10000 }); var routeBuilder = new RouteBuilder(app, new RouteHandler(RemoteUriHelper.HandlerAsync)); routeBuilder.MapRoute("help_and_shiny", "remoteuri"); app.UseRouter(routeBuilder.Build()); app.UseBasicAuthentication(options => { options.Events = new BasicEvents { OnSignIn = securityManager.SignInAsync }; }); app.Use((context, next) => { if (!context.User.Identity.IsAuthenticated) { return context.Authentication.ChallengeAsync(); } else { return next(); } }); app.UseMvc(); }
public PingController(LifetimeManager lifetimeManager) { _lifetimeManager = lifetimeManager; }