Logout by WebHook

@access public
@return Response
190074
public function logout()
    {
        // Token from Clef.io
        if (isset($_POST['logout_token'])) {
            // Verif token
            $clef = \Aperdia\Clef::logout($_POST['logout_token']);

            if (!$clef) {
                // Verif in Authentication table
                $auth = Authentication::whereprovider("clef")->whereprovider_uid($clef)->first();

                if (!empty($auth)) {
                    $user = User::find($auth->user_id);

                    if (!empty($user)) {
                        $user->logout = 1;
                        $user->save();
                    }
                }
            }
        }
    }
486316
public function logout()
    {
        $this->Flash->success(__('You are now logged out.'));
        return $this->redirect($this->Auth->logout());
    }
132328
public function logoutSession()
    {
        $url = $this->serverUrl . "/logout.html";
        $this->restReq->prepAndSend($url, array(302), 'GET');     // Kill server session
        $this->restReq->closeCurlHandle(true);                    // cleanup client resources
    }
155129
public function logout()
    {
        if ($this->check()) {
            $this->matrix()->request('POST', $this->endpoint('logout'), [], [
                'access_token' => $this->data['access_token']
            ]);
            $this->setData(null);
            return true;
        }
        throw new \Exception('Not authenticated');
    }
476784
public static function logout()
    {
        Session::forget(static::resource('session'));
        Cookie::forget(static::resource('cookie'));
        static::$user = null;

        return true;
    }
1153430
public function logout()
	{
		Acct::guard( $this->getGuard() )->logout();

		return Redirect::to( property_exists( $this, 'redirectAfterLogout' ) ? $this->redirectAfterLogout : '/' )->withMessages( [ 'success' => "You are now logged out." ] );
	}
927485
function logoutpage_hook() {
        global $USER, $redirect;

        // Only do this if the user is actually logged in via CAS
        if ($USER->auth === $this->authtype) {
            // Check if there is an alternative logout return url defined
            if (isset($this->config->logout_return_url) && !empty($this->config->logout_return_url)) {
                // Set redirect to alternative return url
                $redirect = $this->config->logout_return_url;
            }
        }
    }
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;
    }
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;
    });
}
1093408
public function logoutAction()
    {
        $auth = $this->auth;
        $this->logger->info('User ' . ($auth->getUser()->getLogin()==''?$auth->getUser()->getInfo()->getDisplayName():$auth->getUser()->getLogin()) . ' logged out');
        $auth->clearIdentity();
        unset($_SESSION['HA::STORE']);

        $this->notification()->success(/*@translate*/ 'You are now logged out');
        return $this->redirect()->toRoute(
            'lang',
            array('lang' => $this->params('lang'))
        );
    }
378010
function logoutpage_hook() {
        global $SESSION, $redirect;

        // Only do this if logout handler is defined, and if the user is actually logged in via Shibboleth
        $logouthandlervalid = isset($this->config->logout_handler) && !empty($this->config->logout_handler);
        if (isset($SESSION->shibboleth_session_id) && $logouthandlervalid ) {
            // Check if there is an alternative logout return url defined
            if (isset($this->config->logout_return_url) && !empty($this->config->logout_return_url)) {
                // Set temp_redirect to alternative return url
                $temp_redirect = $this->config->logout_return_url;
            } else {
                // Backup old redirect url
                $temp_redirect = $redirect;
            }

            // Overwrite redirect in order to send user to Shibboleth logout page and let him return back
            $redirecturl = new moodle_url($this->config->logout_handler, array('return' => $temp_redirect));
            $redirect = $redirecturl->out();
        }
    }
635291
public function logout()
    {
        try {
            SecurityUtils::getSecurityManager()->logout($this);
        } catch (\Exception $ex) {
            $this->_principals    = null;
            $this->_authenticated = false;
            $this->_session       = null;
        }

    }
1187510
function postAuthLogout(req, res) {
    if (authMaintenance.usingSessions) {
      req.logout();
    }
    res.status(200).send('Ok');
  }
1259198
public function actionLogout()
    {
        $event = $this->getUserEvent(\Yii::$app->user->identity);

        $this->trigger(self::EVENT_BEFORE_LOGOUT, $event);

        \Yii::$app->getUser()->logout();

        $this->trigger(self::EVENT_AFTER_LOGOUT, $event);

        \Yii::$app->getResponse()->redirect(Url::to([\Yii::$app->getHomeUrl()]));
    }
185822
public function logout()
    {
        $this->storeAuthenticationResult(AuthenticationResult::LOGOUT);

        $this->setIdentity(null)->setCredential(null);

        return $this->authenticateCreateAuthResult();
    }
453028
def logout
      auth_token = get_connection_object.headers['X-Auth-Token']
      raise "Can't find any authorization token to logout." unless auth_token
      @response = delete("/auth/#{auth_token}")
      if @response.has_key?("success") and @response['success']
        get_connection_object.headers.delete("X-Auth-Token")
      end
      @response
    end
1244136
public function logout()
    {
        $returnValue = (bool) false;

        $returnValue = $this->generisUserService->logout();

        return (bool) $returnValue;
    }