示例#1
0
        public async Task <IActionResult> Index()
        {
            var firstApp = this._moxConfig.Apps.FirstOrDefault();

            if (firstApp != null)
            {
                var userId = HttpContext.User?.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier)?.Value;
                var roles  = await this._rolesFetcher.GetRolesAsync(userId);

                return(Redirect(Url.AppAction(firstApp, roles)));
            }

            return(View(this._moxConfig));
        }