namespace Application.Web { public class StateHelper { public static bool isOnline { get { var token = App.HttpContext.GetTokenInfo(); return token != null; } } public static string userId { get { var token = App.HttpContext.GetTokenInfo(); return token.Claims["userId"]; } } public static string accId { get { var token = App.HttpContext.GetTokenInfo(); return token.Claims["accId"]; } } public static int areaId { get { var token = App.HttpContext.GetTokenInfo(); return Convert.ToInt32(token.Claims["areaId"]) ; } } } }