private async Task <bool> IsTokenValid() { string token = propertiesService.GetJwtToken(); string userName = propertiesService.GetUserName(); string[] userProperties = { token, userName }; if (userProperties.Any(it => string.IsNullOrEmpty(it))) { return(false); } try { await applicationUsersService.GetApplicationUsersAsync(); } catch (UnauthorizedAccessException) { return(false); } return(true); }