public IActionResult Index() { ViewBag.isStrong = _ffdcClientService.GetIsStrongValue(); string authCodeurl = _ffdcClientService.GetFFDCAuthCodeUri(); return(Redirect(authCodeurl)); }
public IActionResult Index() { var isStrong = _ffdcClientService.GetIsStrongValue(); ViewBag.isStrong = isStrong; string token = _ffdcClientService.GenerateToken(isStrong); if (!string.IsNullOrEmpty(token)) { HttpContext.Session.SetString("token", token); return(View("auth", token)); } return(View("error", "Unauthorized!")); }
public IActionResult Index() { ViewBag.isStrong = _ffdcClientService.GetIsStrongValue(); string token = HttpContext.Session.GetString("token"); int responseCode = 200; if (string.IsNullOrEmpty(token)) { return(View("~/Views/Login/error.cshtml", "Unauthorized!")); } var result = _ffdcClientService.GetResults(token, out responseCode); if (responseCode == 200) { return(View("results", result)); } else { return(View("~/Views/Login/error.cshtml", "Unauthorized!")); } }
public IActionResult Index() { ViewBag.isStrong = _ffdcClientService.GetIsStrongValue(); return(View()); }