Example #1
0
        private IAuthResult DoLogin(LoginModel loginModel)
        {
            this.AuthService = this.Container.Resolve <IAuthService>();

            var result = this.AuthService.Login(loginModel);

            if (result.Success)
            {
                CookiHelper.SetCookie(this.HttpContext.Response, result.Login, result.UserID);
            }

            return(result);
        }
Example #2
0
        public ActionResult Logout()
        {
            CookiHelper.RemoveCookie(this.HttpContext.Response);

            return(this.Redirect("~/Home/Index"));
        }