Remove all access tokens from session on logout.
762758
def oauth_logout_handler(sender_app, user=None):
    """"""
    oauth = current_app.extensions['oauthlib.client']
    for remote in oauth.remote_apps.values():
        token_delete(remote)
    db.session.commit()
144046
def clear(self, session):
        
        try:
            sess = self.sessions[session]
        except KeyError:
            return constants.StatusCode.error_invalid_object
        return sess.clear()
131316
def logout(self, callback=None):
        """"""
        self.ddp_client.call('logout', [], callback=callback)
        self.emit('logged_out')
554813
public function logout()
    {
        $this->_session->delete('auth');
        $this->_session->delete('expire');
        $this->_session->delete('_token');
        $this->_session->delete('_token_meta');

        return $this->check() ? false : true;
    }
1209387
def logout(self):
        """"""
        logger.debug('Logout')
        method = self._anaconda_client_api.remove_authentication
        return self._create_worker(method)
614327
def logout(self):
        """"""
        if self.cache(CONST.ACCESS_TOKEN):
            # No explicit logout call as it doesn't seem to matter
            # if a logout happens without registering the app which
            # we aren't currently doing.
            self._session = requests.session()
            self._devices = None

            self.update_cache({CONST.ACCESS_TOKEN: None})

        return True
852684
def _logout(self, reset=True):
        """"""
        url = '{base}/client/auth/logout'.format(base=self.base_url)
        response = self._session.get(url, params=self._parameters)
        if response.ok:
            if reset:
                self._reset()
            return True
        else:
            return False
1031968
public final void closeAndClearTokenInformation() {
        if (this.tokenCachingStrategy != null) {
            this.tokenCachingStrategy.clear();
        }
        Utility.clearFacebookCookies(staticContext);
        Utility.clearCaches(staticContext);
        close();
    }
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
1326142
public function clear()
    {
        $count = $this->loadModel('Muffin/Tokenize.Tokens')->deleteAllExpiredOrUsed();
        $this->out(__n('One token deleted', '{0} tokens deleted', $count, $count));
    }
1011131
public function clearAllTokens()
	{
		$session = $this->getSession();
		foreach ($session as $key => $value) {
			if (strpos($key, self::SESSION_TOKEN_PREFIX) === 0) {
				$session->remove($key);
			}
		}
		return $this;
	}
1872
protected void clearSession (PresentsSession session)
    {
        // remove the session from the username map
        PresentsSession rc;
        synchronized (_usermap) {
            rc = _usermap.remove(session.getAuthName());
        }

        // sanity check just because we can
        if (rc == null) {
            log.info("Cleared session: unregistered!", "session", session);
        } else if (rc != session) {
            log.info("Cleared session: multiple!", "s1", rc, "s2", session);
        } else {
            log.info("Cleared session", "session", session);
        }
    }
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();
    }
805922
public static function logout() {
    self::clearSession();
    $appUrlParts = parse_url(self::$config['app_url']);
    setcookie(
        'TILMELDAUTH',
        '',
        null,
        $appUrlParts['path'],
        $appUrlParts['host']
    );
  }
958384
def remove_authentication(self, auth_name=None, organization=None):
        
        if auth_name:
            if organization:
                url = '%s/authentications/org/%s/name/%s' % (self.domain, organization, auth_name)
            else:
                url = '%s/authentications/name/%s' % (self.domain, auth_name)
        else:
            url = '%s/authentications' % (self.domain,)

        res = self.session.delete(url)
        self._check_response(res, [201])
861871
public static void clearAllRegisteredOperations() {
		UIContext uic = UIContextHolder.getCurrentPrimaryUIContext();
		if (uic != null) {
			uic.setFwkAttribute(AJAX_OPERATIONS_SESSION_KEY, null);
		}
	}
93974
def revoke_access_token(self, access_token):
        
        payload = {'access_token': access_token,}
        req = requests.post(settings.API_DEAUTHORIZATION_URL, data=payload)