using Microsoft.AspNetCore.Mvc; using NuGet.Common; namespace SoftwayWeb.Controllers { public class PortaleController : Controller { string apiUrl = string.Empty; string token = string.Empty; string errMes = string.Empty; private readonly IConfiguration _configuration; HttpClient client; SessionHelper helper; public PortaleController(IConfiguration configuration) { _configuration = configuration; client = new HttpClient(); var key = _configuration["ApplicationInsights:rootUrlApi"]; apiUrl = key; } public IActionResult Index() { helper = new SessionHelper(this); token = helper.GetStringValue("tok"); if (string.IsNullOrEmpty(token)) { return RedirectToAction("Login", "Login"); } else { return View(); } } } }