public IActionResult Secure() { var userName = HttpContext.User.Claims.FirstOrDefault(x => x.Type == $"{ClaimIdentifierConfiguration.ClaimsBaseUrl}{ClaimIdentifierConfiguration.DisplayName}"); var viewmodel = new SecureViewModel { DisplayName = userName?.Value }; return(View(viewmodel)); }
public async Task <IActionResult> Index() { var auth = User.GetAuth(); var characterInfo = await esiClient.Character.GetCharacterPublicInfoV4Async(auth.CharacterId); var corporationInfo = await esiClient.Corporation.GetCorporationInfoV4Async(characterInfo.Model.CorporationId); var locationInfo = await esiClient.Location.GetCharacterLocationV1Async(auth); var location = await esiClient.Universe.GetSolarSystemInfoV4Async(locationInfo.Model.SolarSystemId); var model = new SecureViewModel { CharacterName = characterInfo.Model.Name, CorporationName = corporationInfo.Model.Name, CharacterLocation = location.Model.Name }; return(View(model)); }