Logout from the backend

        :return: return True if logout is successfull, otherwise False
        :rtype: bool
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
707605
def logout(request):
    '''
    
    '''
    user = request.user
    serializer = LogoutSerializer(data=request.data)
    serializer.is_valid(raise_exception=True)
    data = serializer.validated_data

    if should_authenticate_session():
        auth.logout(request)
    if should_retrieve_token() and data['revoke_token']:
        try:
            user.auth_token.delete()
        except Token.DoesNotExist:
            raise BadRequest('Cannot remove non-existent token')

    return get_ok_response('Logout successful')
1000598
def logout_callback():
    
    resp = make_response('Logging Out')
    resp.set_cookie('sub', 'null', expires=0)
    resp.set_cookie('session_id', 'null', expires=0)
    return resp
1214981
public function logout()
		{

			// Am I authenticated?
			if ($this->isAuthenticated() == false) {

				// Cannot logout!
				return false;

			}

			// Destroy my session
			$this->_authenticated = false;
			unset($_SESSION[self::$_sessionPrefix . $this->name]);
			$this->_user = null;
			return true;

		}
725715
def get_logout_url(service):
    """"""
    for backend in _get_backends():
        try:
            return backend.get_logout_url(service)
        except AttributeError:
            raise NotImplementedError("%s.%s.get_logout_url() not implemented" % (
                backend.__class__.__module__, backend.__class__.__name__)
            )
    return None
555099
def logout(self, request, extra_context=None):
        
        from django.contrib.auth.views import logout
        defaults = {
            'extra_context': extra_context or {},
            'template_name': 'cms/logged_out.html',
        }
        if self.logout_template is not None:
            defaults['template_name'] = self.logout_template
        return logout(request, **defaults)
1027417
def logout(cache):
    
    cache.set(flask.session['auth0_key'], None)
    flask.session.clear()
    return True
103437
function logout() {
    if (exports.currentLogin === null) {
        log_1.logger.debug(`[API] Already logged out`);
        return Promise.resolve();
    }
    log_1.logger.info(`[API] Logging out ${exports.currentLogin.username}`);
    return get('logout', null, true).then(() => {
        clearHeaders();
        exports.currentLogin = null;
    });
}
651283
public function logout()
    {
        if (!$this->hasSudoed()) {
            return false;
        }

        $this->auth->logout();

        $originalUserId = $this->session->get($this->sessionKey);

        if ($originalUserId) {
            $this->auth->loginUsingId($originalUserId);
        }

        $this->session->forget($this->sessionKey);
        $this->session->forget('sudosu.has_sudoed');

        return true;
    }
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
1242815
public function afterLogout(): bool
    {
        $token = \Yii::$app->getRequest()->getCookies()->getValue('auth_token');
        $websiteToken = $this->__userAccessTokenClass::findOne(['user_id' => $this->id, 'access_token' => $token]);
        if ($websiteToken instanceof $this->__userAccessTokenClass) {
            $websiteToken->deactivate();
        }
        \Yii::$app->getResponse()->getCookies()->remove('auth_token');
        return true;
    }
1322803
def logout(ctx):
    
    check_for_cloud_server()
    check_for_cloud_user()
    if config["cloud_server"]["farm_name"]:
        ctx.invoke(deinit_farm)
    config["cloud_server"]["username"] = None
    config["cloud_server"]["password"] = None
220553
def logout(client):
    
    if not client.session_id:
        client.request_session()

    concierge_request_header = client.construct_concierge_header(
        url=("http://membersuite.com/contracts/IConciergeAPIService/"
             "Logout"))

    logout_result = client.client.service.Logout(
        _soapheaders=[concierge_request_header])

    result = logout_result["body"]["LogoutResult"]

    if result["SessionID"] is None:  # Success!
        client.session_id = None
    else:  # Failure . . .
        raise LogoutError(result=result)
404269
def logout(self):
        
        response = None
        try:
            response = requests.delete(
                urls.login(),
                headers={
                    'Cookie': 'vid={}'.format(self._vid)})
        except requests.exceptions.RequestException as ex:
            raise RequestError(ex)
        _validate_response(response)
85951
def disconnect(self, abandon_session=False):
        
        self.connected = False
        if (self.session and self.session.is_expired) or abandon_session:
            try:
                self.logout()
            except:
                log.warning(
                    'Logout call to responsys failed, session may have not been terminated',
                    exc_info=True
                )
            del self.session
        return True
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')
1216940
def logout():
    "  "
    users.logout()
    return redirect(request.referrer or url_for(users._login_manager.login_view))