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-09-04 15:42:21 +0300
committerRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-04 15:42:21 +0300
commit404cff82fe27cc8e00b5eee4d41f825c4ba3a569 (patch)
treeaaa01e966981a9598ab760ef8ae2bf9ea6ec0576 /Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
parentda102bf068b5a0734008cc576a20aef97ae0495b (diff)
downloadTango-404cff82fe27cc8e00b5eee4d41f825c4ba3a569.tar.gz
Tango-404cff82fe27cc8e00b5eee4d41f825c4ba3a569.zip
Twine portal <-> AI auth interaction.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
index b913ec6d8..dff8a140e 100644
--- a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
+++ b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs
@@ -15,6 +15,7 @@ using Tango.Portal.Models;
using Tango.Portal.Utils;
using Tango.Portal.ViewModels;
using System.Data.Entity;
+using Newtonsoft.Json;
namespace Tango.Portal.Controllers
{
@@ -167,6 +168,13 @@ namespace Tango.Portal.Controllers
}
}
+ public ActionResult AI()
+ {
+ if (!SessionUser.IsTwineUser) return RedirectToAction(nameof(Login));
+ String session = SimpleCryptoHelper.Encrypt(JsonConvert.SerializeObject(new { UserName = SessionUser.Name, Expires = DateTime.UtcNow.AddHours(1) }));
+ return new RedirectResult($"https://ai.twine-srv.com?session={session}");
+ }
+
public ActionResult Docs()
{
DocsVM vm = new DocsVM(SessionUser);