public ActionResult Login(AdminLoginData ald) { _ah = WagenWebHelper.SignInAccount( this.AuthAdmin, ald.Login, ald.Password, this.GetAdminSessionId, AppHelper.Constants.ADMIN_COOKIE_NAME, this.Response); return RedirectToAction("index"); }
protected override void OnActionExecuting(ActionExecutingContext filterContext) { string action = filterContext.ActionDescriptor.ActionName.ToLower(); if (action == "login") { // we wanna login, no problem } else { _ah = WagenWebHelper.GetAccountHandle( AppHelper.Constants.ADMIN_COOKIE_NAME, this.GetAdmin, this.Request, this.Response); if (_ah == null) { filterContext.Result = this.RedirectToAction("index", "home"); } } base.OnActionExecuting(filterContext); }
private string GetAdminSessionId(IAdminHandle ah) { return ah.SessionId; }