/// <summary> /// 登出。 /// </summary> /// <param name="userName">用户名。</param> /// <param name="cancelAutoLogin">一个值,指示是否取消自动登入。</param> /// <returns></returns> public IManagerPage Logout(string userName, bool cancelAutoLogin) { LogoutInfo logoutInfo = new LogoutInfo() { wlanAcName = this.wlanAcName, wlanUserIp = this.wlanUserIp, userName = userName, encryUser = string.Format("{0}{1:D15}", this.currentTime.ToString("yyyyMMddHHmmssfff"), // 当前日期时间作为前17位. 0 // 后跟15位0,补齐32位。 ) }; string dataStr = logoutInfo.SerializeData(); string response = this.encoding.GetString( HttpRequestUtil.Post( this.loginActionAddress, this.encoding.GetBytes(dataStr) ) ); HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(response); return(new LogoutingPage(doc) { wlanAcName = this.wlanAcName, wlanUserIp = this.wlanUserIp, scriptVariants = this.scriptVariants }); }
public async Task <IActionResult> Logout(LogoutInfo model) { var result = await _mediator.Send(new LoggedOutInfoQuery(model.LogoutId)); await _mediator.Send(new LogoffCommand()); return(Redirect(result.PostLogoutRedirectUri)); }
public async static Task GetLogoutInfo() { var logout_result = new LogoutInfo(); string customerid = "DASYS"; string url = String.Format("http://nxfrontend-qa.nxframework.com/NXRest.svc/logout?customer=" + customerid + "&session=" + session_id1); logout_result = await APIAccess.APIAccess.logOut(url); result = logout_result.LogoutResult; }
public async static Task GetLogoutInfo() { var logout_result = new LogoutInfo(); customerId = Mvx.Resolve <ILocalStorage>().RetrieveSet("customer"); string url = Java.Lang.String.Format("http://nxfrontend-qa.nxframework.com/NXRest.svc/logout?customer=" + customerId + "&session=" + Mvx.Resolve <ILocalStorage>().RetrieveSet("login_session_id")); logout_result = await APIAccess.logOut(url); result = logout_result.LogoutResult; }
public ActionResult Logout(LogoutInfo model) { model.ReconstructSettings(); this.ViewData[LogoutInfo.Key] = model; LoadPage(model.Settings.Uri); if (ModelState.IsValid) { ModelState.Clear(); } securityHelper.AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie); return(PartialView(model.Settings.PostPartialName)); }
public HttpResult Logout(LogoutInfo logout) { if (logout == null || string.IsNullOrEmpty(logout.UserName)) { return(new HttpResult { RetCode = 1, Message = "Fail to logout, provide your user name!" }); } else { return(new HttpResult { RetCode = 0, Message = logout.UserName + ": You are now logout!" }); } }
public async static Task <LogoutInfo> logOut(string base_url) { try { string contents; string url = String.Format(base_url); HttpClient client = new HttpClient(); contents = await client.GetStringAsync(url); logoutresult = JsonConvert.DeserializeObject <LogoutInfo>(contents); return(logoutresult); } catch (System.Exception sysExc) { throw; } }
public void OnLogout(QuoteStore quoteFeedClient, LogoutInfo info) { if (this.InvokeRequired) { this.InvokeInPrimaryThread(OnLogout, quoteFeedClient, info); return; } try { Console.WriteLine("Logout : " + info.Message); } catch (Exception exception) { Console.WriteLine("Error : " + exception.Message); } }
public async Task <ActionResult <bool> > Logout(LogoutInfo info) { try { using (M4LoginManager.MicroareaLoginManagerSoapClient m4Login = getLoginManager()) { await m4Login.LogOffAsync(info.AuthenticationToken); return(true); } } catch (System.Exception ex) { ContentResult err = Content(ex.Message); err.StatusCode = 500; return(err); } }