Logout for current user. It wil clear session and cookie.
507313
public function logout()
    {
        $this->_userData = array();
        $this->_rights = array();
        $this->connected = false;
        Session::get()->delete(App::get()->shortName . $this->sessionKey);
        Cookie::get()->delete(App::get()->shortName . $this->cookieKey);
        Cookie::get()->delete($this->cookieKey);
        session_destroy();
    }
578479
function(req, res) {
      waterlock.logger.debug('user logout');
      delete(req.session.user);

      if (req.session.authenticated) {
        this.logoutSuccess(req, res);
      } else {
        this.logoutFailure(req, res);
      }
    }
1084825
public function logout()
    {
        $user = $this->user();
        // If we have an event dispatcher instance, we can fire off the logout event
        // so any further processing can be done. This allows the developer to be
        // listening for anytime a user signs out of this application manually.
        $this->clearUserDataFromStorage();
        if (isset($this->events)) {
            $this->events->dispatch(new Logout($user));
        }
        // Once we have fired the logout event we will clear the users out of memory
        // so they are no longer available as the user is no longer considered as
        // being signed into this application and should not be available here.
        $this->user = NULL;
        $this->loggedOut = TRUE;
    }
493381
def logout(self):
        
        logger.debug("request backend logout")
        if not self.authenticated:
            logger.warning("Unnecessary logout ...")
            return True

        endpoint = 'logout'

        _ = self.get_response(method='POST', endpoint=endpoint)

        self.session.close()
        self.set_token(token=None)

        return True
662646
def cleanup(self):
        """"""
        self.exit_config_mode()
        self.write_channel("logout" + self.RETURN)
        count = 0
        while count <= 5:
            time.sleep(0.5)
            output = self.read_channel()
            if "Do you want to log out" in output:
                self._session_log_fin = True
                self.write_channel("y" + self.RETURN)
            # Don't automatically save the config (user's responsibility)
            elif "Do you want to save the current" in output:
                self._session_log_fin = True
                self.write_channel("n" + self.RETURN)

            try:
                self.write_channel(self.RETURN)
            except socket.error:
                break
            count += 1
776112
def logout(self):
        
        if current_user.is_authenticated:
            self.security_service.logout_user()

        if request.is_json:
            return '', HTTPStatus.NO_CONTENT

        self.flash(_('flask_unchained.bundles.security:flash.logout'),
                   category='success')
        return self.redirect('SECURITY_POST_LOGOUT_REDIRECT_ENDPOINT')
310415
def logout(self):
        
        self.req(API_ACCOUNT_LOGOUT % self.ck())
        self.cookies = {}
        self.user_alias = None
        self.persist()
282569
public function logout($clearCookies=true)
	{
		$this->user['id'] = null;
		$this->user['auth'] = false;
		$this->user['access'] = GUEST;
		if ($clearCookies)
		{
			$this->clear_login_cookies();
		}
	}
176637
def signout(self, redirect_url = "/"):
        
        self.clear_cookie(self._USER_NAME)
        if redirect_url: self.redirect(redirect_url)
601961
public function logout()
    {
        setcookie($this->config->getCookieName(), '', time() - 3600); // Remove client-side cookie.
        unlink($this->config->getSessionFileName()); // Delete session file.
    }
1010371
public function logout()
    {
        $authService = $this->getServiceManager()->get('zfcuser_auth_service');
        $user = $authService->getIdentity();

        $cookie = explode("\n", $this->getRememberMeService()->getCookie());

        if ($cookie[0] !== '' && $user !== null) {
            $this->getRememberMeService()->removeSerie($user->getId(), $cookie[1]);
            $this->getRememberMeService()->removeCookie();
        }
    }
628209
public function logout()
    {
        // Irrelevant call...
        if (!$this->id()) {
            return false;
        }

        $key = static::sessionKey();

        $_SESSION[$key] = null;
        unset($_SESSION[$key], static::$authenticatedUser[$key]);

        return true;
    }
1050911
public void logout(){
        List<LocalCredentials> accountList = accountStorage.getAccounts();
        if(accountList.size() == 1){
            String userName = accountList.get(0).getName();
            logger.debug("logout: " + userName);
            accountStorage.removeAccount(userName);
            user = null;
        }
        setLoginState(LoginState.LOGGED_OUT);
    }
824695
def logout(self):
        
        url = self.address + "/logout"
        header = self.__check_authentication()
        response = requests.get(url, headers=header)
        if response.status_code != 200:
            raise ValueError("Code {}. {}".format(response.status_code, response.json().get("error")))
392882
public function logout()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $this->exec_curl('/logout');
        $this->is_loggedin = false;
        $this->cookies     = '';

        return true;
    }
272671
public function logout(): void
	{
		$this->session->regenerateId();

		$this->session->regenerateToken();

		$this->session->remove($this->options['auth_key']);

		$this->response->getCookies()->delete($this->options['auth_key'], $this->options['cookie_options']);

		$this->user = null;

		$this->hasLoggedOut = true;
	}
921893
def logout
      handler = proc do
        if response.code == 204
          clear_session
        else
          case response.code
          when 401 then
            raise Jiralicious::NotLoggedIn, "Not logged in"
          else
            # Give Net::HTTP reason
            raise Jiralicious::JiraError, response
          end
        end
      end

      request(:delete, "/rest/auth/latest/session", handler: handler)
    end