aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
index 58625d768..b913ec6d8 100644
--- a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
+++ b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
@@ -48,7 +48,9 @@ namespace Tango.Portal.Controllers
public ActionResult Index()
{
- return View(new ViewModel(SessionUser));
+ var vm = new IndexVM(SessionUser);
+ vm.Stats = StatisticsUtils.Default.GetStats();
+ return View(vm);
}
public ActionResult Product(String key, PortalEnvironment environment = PortalEnvironment.Production)
@@ -242,10 +244,12 @@ namespace Tango.Portal.Controllers
public void SignInMicrosoft()
{
+ string callbackUrl = Url.Action("Index", "Home", routeValues: null, protocol: Request.Url.Scheme);
+
// Send an OpenID Connect sign-in request.
if (!Request.IsAuthenticated)
{
- HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/" },
+ HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = callbackUrl },
OpenIdConnectAuthenticationDefaults.AuthenticationType);
}
}
@@ -254,16 +258,11 @@ namespace Tango.Portal.Controllers
{
SessionUser = null;
- string callbackUrl = Url.Action("SignOutCallback", "Home", routeValues: null, protocol: Request.Url.Scheme);
+ string callbackUrl = Url.Action("Index", "Home", routeValues: null, protocol: Request.Url.Scheme);
HttpContext.GetOwinContext().Authentication.SignOut(
new AuthenticationProperties { RedirectUri = callbackUrl },
OpenIdConnectAuthenticationDefaults.AuthenticationType, CookieAuthenticationDefaults.AuthenticationType);
}
-
- public ActionResult SignOutCallback()
- {
- return RedirectToAction("Index", "Home");
- }
}
} \ No newline at end of file