/// <summary> /// 设置授权Cookie /// </summary> /// <param name="model">登录数据实体</param> public override bool SetAuthCookie(LoginModel model) { var context = new HttpContextWrapper(HttpContext.Current); var token = context.GetTokenFromSession(); var principal = context.GetPrincipal(token: token); context.AddAuthCookie(token, principal, model.RememberMe); return(true); }