示例#1
0
 public PassportController()
 {
     UserManager =
         new UserManager<AppUser>(
             new AppUserStore(System.Web.HttpContext.Current.Server.MapPath("~/App_Data/user.txt")));
     _authSessionService = new UserAuthSessionService(System.Web.HttpContext.Current.Server.MapPath("~/App_Data/auth.txt"));
 }
示例#2
0
        public string GetUser(string token = "", string requestid = "")
        {
            var user = new UserAuthSessionService().Get(token);

            if (user != null)
            {
                return(JsonHelper.Instance.Serialize(_app.GetLoginUser(user.UserName)));
            }

            return(string.Empty);
        }