Sends a standard logout request to the EPP server.
179302
def logout
      raise SocketError, "Socket must be opened before logging out" if !@socket or @socket.closed?
      
      xml = new_epp_request
      
      xml.root << command = Node.new("command")
      
      command << login = Node.new("logout")
      command << Node.new("clTRID", UUIDTools::UUID.timestamp_create.to_s)
      
      response = Hpricot::XML(send_request(xml.to_s))
      
      handle_response(response, 1500)
    end
1207832
public function logout()
    {

        // load the authentication manager and try to authenticate this request
        /** @var \AppserverIo\Psr\Auth\AuthenticationManagerInterface $authenticationManager */
        if ($authenticationManager = $this->getAuthenticationManager()) {
            // try to load the authentication managers default authenticator
            if (($authenticator = $authenticationManager->getAuthenticator()) == null) {
                throw new ServletException('Can\'t find default authenticator');
            }

            // logout the actual user
            $authenticator->logout($this);
        }
    }
1275642
def _logout_request(self):
        """"""
        _LOGGER.debug('logout')
        url = 'http://' + self._host + '/login_sid.lua'
        params = {
            'security:command/logout': '1',
            'sid': self._sid
        }

        self._request(url, params)
868925
def logout(self):
        """"""

        # Check if all transfers are complete before logout
        self.transfers_complete

        payload = {
            'apikey': self.config.get('apikey'),
            'logintoken': self.session.cookies.get('logintoken')
            }

        method, url = get_URL('logout')
        res = getattr(self.session, method)(url, params=payload)

        if res.status_code == 200:
            self.session.cookies['logintoken'] = None
            return True

        hellraiser(res)
1020141
public function logout()
    {
        $this->execute($this->httpClient->setEndPoint(self::ENDPOINT.'logout/'));

        self::$appKey = null;
        self::$sessionToken = null;
        self::$lastLogin = null;
    }
125290
public function logout()
  {
    $this->request("logout");
    $this->whoamiReset();

    $this->delStorage("_login_user");
    $this->delStorage("_login_pass");

    TeamSpeak3_Helper_Signal::getInstance()->emit("notifyLogout", $this);
  }
1218920
public void doLogout(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        if (!common.checkPost(request, response)) return;
        request.getSession().removeAttribute("logged-in-username");
        response.sendRedirect("/");
    }
520830
function handleLogout(req, res, next) {
		var p = new Promise(function (resolve, reject) {
			// Return success even if not currently logged in.
			if (!req.locals.user) {
				debug(`Request is not authenticated, nobody to logout.`);
				return resolve({
					success: true,
					message: 'not logged in'
				});
			}

			// Lookup current user and do the logout.
			debug(`Logging out the current authenticated session for User ${req.locals.user}`);
			AclUser.findOne({
				_id: req.locals.user._id,
				local_auth_type: 'password',
				active: true
			}, function (err, user) {
				if (err) {
					debug(`Error finding User during logout request.`, err);
					return reject(new restifyErrors.InternalError(err));
				}
				if (!user) {
					debug(`User not found during logout request.`);
					return resolve({
						success: true,
						message: 'not found'
					});
				}
				user.modifiedBy = 'logout';
				user.last_logout_date = new Date();

				// Destroy the current Bearer token 
				for (var i = user.bearer.length - 1; i > -1; i--) {
					if (req.headers.authorization == `Bearer ${user.bearer[i].token}`) {
						user.bearer.splice(i, 1);
						break;
					}
				}

				// Save the User back to the database
				user.save(function (err, result) {
					if (err) {
						debug(`Error updating user during logout request.`, err);
						return reject(new restifyErrors.InternalError(err));
					}
					resolve({
						success: true,
						message: 'success'
					});
				});
			});
		}).then(function (data) {
			req.logout(); // Provided by Passport
			res.json(data);
			next();
		}).catch(function (err) {
			debug(`Error handling logout request.`, err);
			next(err);
		});
	}
933046
@RequestMapping(value = "/userLogout", method = RequestMethod.GET)
    @ResponseBody
    public JsonObject<?> logout(HttpServletResponse response) {
        JsonObject<?> ret = JsonObject.create();
        CookieUtils.resetCookieValue(response, UserWebConstant.CookieKey.USERNAME.getValue());
        CookieUtils.resetCookieValue(response, UserWebConstant.CookieKey.PWDMD5.getValue());
        return ret;
    }
497610
def logout_user(request):
    """"""
    logger.debug("Logout request received for %s" % request.user)
    if is_authenticated(request.user):
        ServiceTicket.objects.consume_tickets(request.user)
        ProxyTicket.objects.consume_tickets(request.user)
        ProxyGrantingTicket.objects.consume_tickets(request.user)

        ServiceTicket.objects.request_sign_out(request.user)

        logger.info("Single sign-on session ended for %s" % request.user)
        logout(request)
        messages.success(request, _('You have been successfully logged out'))
1172691
public static void putLogoutRequests(final RequestContext context, final List<SingleLogoutRequest> requests) {
        context.getFlowScope().put(PARAMETER_LOGOUT_REQUESTS, requests);
    }
395041
private function toServerLogout()
	{
		$logoutUrl = $this->_config['logout'].$this->signature().'&appId='.$this->_config['appId'];
		header('Location:'.$logoutUrl);
	}
699898
function(req, res) {
      var defaultString = 'You have successfully logged out.';

      // now respond or redirect
      var postResponse = this._resolvePostAction(waterlock.config.postActions.logout.failure,
        defaultString);

      if (typeof postResponse === 'string' && this._isURI(postResponse)) {
        res.redirect(postResponse);
      } else {
        res.ok(postResponse);
      }
    }
1032408
public function createLogoutRequest()
    {
        return (new LogoutRequest())
            ->setID(Helper::generateID())
            ->setVersion(SamlConstants::VERSION_20)
            ->setIssueInstant(new \DateTime())
            ->setIssuer(new Issuer($this->getMetadata()->getServiceProvider()->getEntityID()));
    }
533093
function logOut(options) {
    var url = getRedirectTo( options, 'root' );
    return function(req, res, next) {
        req.logout();
        res.redirect( url );
    };
}
407836
function() {

		var _this = this;
		var utils = _this.utils;
		var error = utils.error;

		// Create a new promise
		var promise = utils.Promise();

		var p = utils.args({name:'s', options: 'o', callback: 'f'}, arguments);

		p.options = p.options || {};

		// Add callback to events
		promise.proxy.then(p.callback, p.callback);

		// Trigger an event on the global listener
		function emit(s, value) {
			hello.emit(s, value);
		}

		promise.proxy.then(emit.bind(this, 'auth.logout auth'), emit.bind(this, 'error'));

		// Network
		p.name = p.name || this.settings.default_service;
		p.authResponse = utils.store(p.name);

		if (p.name && !(p.name in _this.services)) {

			promise.reject(error('invalid_network', 'The network was unrecognized'));

		}
		else if (p.name && p.authResponse) {

			// Define the callback
			var callback = function(opts) {

				// Remove from the store
				utils.store(p.name, null);

				// Emit events by default
				promise.fulfill(hello.utils.merge({network:p.name}, opts || {}));
			};

			// Run an async operation to remove the users session
			var _opts = {};
			if (p.options.force) {
				var logout = _this.services[p.name].logout;
				if (logout) {
					// Convert logout to URL string,
					// If no string is returned, then this function will handle the logout async style
					if (typeof (logout) === 'function') {
						logout = logout(callback, p);
					}

					// If logout is a string then assume URL and open in iframe.
					if (typeof (logout) === 'string') {
						utils.iframe(logout);
						_opts.force = null;
						_opts.message = 'Logout success on providers site was indeterminate';
					}
					else if (logout === undefined) {
						// The callback function will handle the response.
						return promise.proxy;
					}
				}
			}

			// Remove local credentials
			callback(_opts);
		}
		else {
			promise.reject(error('invalid_session', 'There was no session to remove'));
		}

		return promise.proxy;
	}
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()