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 sid { get { var token = App.HttpContext.GetTokenInfo(); return token.Claims["token"]; } } } }