public async Task <IActionResult> Index() { ApiResultDto <string> unprotectedResp; ApiResultDto <string> protectedResp; unprotectedResp = await _serviceHelper.GetRequest <ApiResultDto <string> >(_apiEndpoints.ClientName, _apiEndpoints.Challenge.GetUnAuth); protectedResp = await _serviceHelper.GetRequest <ApiResultDto <string> >(_apiEndpoints.ClientName, _apiEndpoints.Challenge.GetAuth); if (unprotectedResp == null || protectedResp == null || unprotectedResp?.Error != null || protectedResp?.Error != null) { return(BadRequest()); } return(View(new ChallengeViewModel() { UnprotectedData = unprotectedResp.Result, ProtectedData = protectedResp.Result })); }