aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2025-07-20 01:16:18 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2025-07-20 01:16:18 +0300
commit4b737c824ee1b1a347ea63aabe3273f2c16f3ac3 (patch)
treeaaca710d99cb56dba5dcbd9bbf5187ca30c8644b /Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
parent017a25bec7cbfa3a7d7f058ac2555948f4962a8c (diff)
downloadTango-4b737c824ee1b1a347ea63aabe3273f2c16f3ac3.tar.gz
Tango-4b737c824ee1b1a347ea63aabe3273f2c16f3ac3.zip
Published Portal.
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