/// <summary> /// Clicks the register navigation button. /// </summary> /// <returns>The expected <see cref="LoginPage"/> that should result from this action.</returns> public LoginPage Logout() { WaitForLoad(); LogoutForm.Submit(); return(new LoginPage(Helper.LoginPage.AbsoluteUri, Helper.LoginPageTitle)); }
public async Task <bool> Logout(LogoutForm form) { var token = await _tokensRepository.GetById(form.TokenId); if (token == null) { return(false); } var result = await _tokensRepository.RevokeByTokenId(form.ActorId, form.TokenId); return(result); }
public async Task <IActionResult> Logout([FromBody] LogoutForm logout) { var logoutActivity = new AccountActivity { AccountId = logout.AccountId, IpAddress = _httpContext.Connection.RemoteIpAddress.ToString(), Operation = "Выход из системы", At = DateTime.Now }; await _db.CreateAccountActivityAsync(logoutActivity); await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); return(Ok(new { loggedOut = true })); }
/// <summary> /// Clear both the stored credentials and user's SSO cookie by calling Auth0 logout endpoint /// </summary> /// <param name="parentControl"></param> public void Logout(Control parentControl) { Credentials credentials = myCredentialStorageService.Credentials as Credentials; // Clear all stored user information myCredentialStorageService.Delete(); // In the case where the user has restarted NVivo, and then click the Sign Out button // or if the user's credentials file is manually deleted so we need to kill the Auth0 cookie myAuth0ServiceProxy = new Auth0ServiceProxy(new RestClientFactory(), credentials); Uri logoutUri = new Uri(Auth0ServiceProxy.GetLogoutUrl(), UriKind.Absolute); LogoutForm logoutForm = new LogoutForm(myAuth0ServiceProxy, logoutUri); logoutForm.Show(); var progressForm = new LogoutProgressForm(logoutForm); progressForm.ShowDialog(); myAuth0ServiceProxy = null; }
private void validateStaff(Button but, StaffModel model) { NumPad numPad = new NumPad(model); numPad.ShowDialog(); this.passwordValid = numPad.passwordValid; if (passwordValid == true) { //if logging in if (model.loggedIn == false) { but.BackColor = Color.DodgerBlue; but.ForeColor = Color.Ivory; model.loggedIn = true; GlobalConfig.Connection.Login(model); shift.StaffID = model.staffID; shift.LoginTime = DateTime.Now; shift.LogoutTime = null; GlobalConfig.Connection.CreateShift(shift); } else //logging out { LogoutForm lo = new LogoutForm(model); this.TopMost = false; lo.ShowDialog(); but.BackColor = Color.White; but.ForeColor = Color.DodgerBlue; model.loggedIn = false; shift.LogoutTime = DateTime.Now; shift.StaffID = model.staffID; GlobalConfig.Connection.Logout(model); GlobalConfig.Connection.LogoutShift(shift); } } }
public LogoutCtrl(string token) { _dbConn = new DBConnector(); _token = token; _form = new LogoutForm(this); }