using Microsoft.AspNetCore.Mvc; using ProductionLineMonitor.Core.Dtos; using ProductionLineMonitor.Core.Utils; using ProductionLineMonitor.Web.Filters; using System.Linq; using System.Security.Claims; namespace ProductionLineMonitor.Web.Controllers { [AuthenFilter] [GlobalModelValidate] [TypeFilter(typeof(GlobalExceptionAttribute))] public class BaseController : Controller { protected UserLoginResultInfoDto _userLoginInfo; public override ViewResult View() { string value = HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.UserData).Value; _userLoginInfo = value.ToObject(); return base.View(_userLoginInfo); } } }