public override Task <ApplicationUser> FindAsync(string userName, string password) { Task <ApplicationUser> task = Task <ApplicationUser> .Factory.StartNew(() => { USER u = new USER(); var result = u.Login(userName, password); if (result == null) { return(null); } else { return(new ApplicationUser() { UserName = result.USER_NAME }); } }); return(task); //return base.FindAsync(userName, password); }
/// <summary> /// 客户端调用Login之后传回Code,根据code获取openid,如果已存在用户信息,则返回用户信息,否则返回错误状态值,前端再请求用户授权 /// </summary> /// <param name="code"></param> /// <returns></returns> public ResultModel Login(string code) { USER user = RemotingHelp.GetModelObject <USER>(); return(user.Login(code)); }