protected void Application_Start(object sender, EventArgs e) { var authentication = new TeamCityAuthentication(); ConfigureWebApi(GlobalConfiguration.Configuration, authentication); ConfigureMvc(GlobalFilters.Filters, authentication); ConfigureSignalR(GlobalHost.DependencyResolver); ConfigureRoutes(RouteTable.Routes); }
public ActionResult IndexPost() { var username = Request.Form["username"]; var password = Request.Form["password"]; var loginSuccessful = TeamCityAuthentication.Login(username, password); if (loginSuccessful) { return(RedirectToAction("Index", "Home")); } ViewBag.LoginError = "Invalid username or password"; return(View()); }
public ActionResult Logout() { TeamCityAuthentication.Logout(); return(RedirectToAction("Index", "Home")); }