Return session id sent from broker.

@return null|string
776458
protected function getBrokerSessionId()
    {
        $headers = getallheaders();
        if (isset($headers['Authorization']) &&  strpos($headers['Authorization'], 'Bearer') === 0) {
            $headers['Authorization'] = substr($headers['Authorization'], 7);

            return $headers['Authorization'];
        }

        return null;
    }
609595
public function getSessionId() {
        $name = session_name();

        if (ini_get_bool('session.use_cookies'))
            if (isset($_COOKIE[$name]))
                return $_COOKIE[$name];

        if (!ini_get_bool('session.use_only_cookies'))
            if (isset($_REQUEST[$name]))
                return $_REQUEST[$name];

        return '';
    }
763850
protected function getSessionId() {
    // check if we already have a session with the server
    $session = ObjectFactory::getInstance('session');
    $sids = $session->get(self::SIDS_SESSION_VARNAME);
    if (isset($sids[$this->serverCli])) {
      return $sids[$this->serverCli];
    }
    return null;
  }
756746
public function id()
    {
        if ($this->loggedOut) {
            return;
        }

        return $this->user()
                    ? $this->user()->getAuthIdentifier()
                    : $this->session->get($this->getName());
    }
769634
protected function & getSession () {
		if (isset(self::$allFormsSessions[$this->id])) {
			$sessionNamespace = & self::$allFormsSessions[$this->id];
		} else {
			$sessionClass = self::$sessionClass;
			$toolClass = self::$toolClass;
			$formIdPc = $this->id;
			if (strpos($formIdPc, '-') !== FALSE)
				$formIdPc = $toolClass::GetPascalCaseFromDashed($formIdPc);
			if (strpos($formIdPc, '_') !== FALSE)
				$formIdPc = $toolClass::GetPascalCaseFromUnderscored($formIdPc);
			$namespaceName = '\\MvcCore\\Ext\\Form\\' . ucfirst($formIdPc);
			$sessionNamespace = $sessionClass::GetNamespace($namespaceName);
			// Do not use hoops expiration, because there is better
			// to set up any large value into session namespace
			// or zero value to browser close and after rendered
			// errors just clear the errors.
			//$sessionNamespace->SetExpirationHoops(1);
			$sessionNamespace->SetExpirationSeconds($this->sessionExpiration);
			if (!isset($sessionNamespace->values)) $sessionNamespace->values = [];
			if (!isset($sessionNamespace->csrf)) $sessionNamespace->csrf = [];
			if (!isset($sessionNamespace->errors)) $sessionNamespace->errors = [];
			self::$allFormsSessions[$this->id] = & $sessionNamespace;
		}
		return $sessionNamespace;
	}
276120
private function getUserId()
    {
        $id = null;

        if (null !== $this->tokenStorage && null !== $this->tokenStorage->getToken()) {
            $user = $this->tokenStorage->getToken()->getUser();

            if ($user instanceof UserInterface) {
                $id = $user->getId();
            }
        }

        return $id;
    }
1346209
public static function getSessionID()
    {
        $id = Arr::get($_COOKIE, HttpCache::$sessionName, '');
        Base::getLog()->debug(__METHOD__ . ' get session id', [
            'id' => $id,
        ]);
        return $id;
    }
800223
public function userId()
	{
		if (isset($this->user_id)) {
			return $this->user_id ? $this->user_id : null;
		}
		
		$this->check();
		$this->user_id = false;
		
		if ('user' == $this->type) {
			if ($user_id = Authorizer::getResourceOwnerId()) {
				return $this->user_id = $user_id;
			}
		}
		
		return null;
	}
1108254
public function getSessionKey()
    {
        if ($this->sessionKey) {
            return $this->sessionKey;
        }

        if (post('_session_key')) {
            return $this->sessionKey = post('_session_key');
        }

        return $this->sessionKey = FormHelper::getSessionKey();
    }
803064
@Override
    public String getConversationId() {
        final HttpSession session = this.getPortalSesion(false);

        if (session == null) {
            return null;
        }

        return session.getId();
    }
945029
public function getId()
    {
        if (is_null($this->id)) {
            $this->id = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true)) . '@mailer.generated';
        }

        return $this->id;
    }
1130766
public function getClientId()
    {
        preg_match('#branch\/(\d+)/#', $this->url, $matches);

        return isset($matches[1]) ? (int) $matches[1] : null;
    }
1047210
public function getClientId()
    {
        if (!isset($this->_poolClientId)) {
            while (!isset($id) || !$this->isPoolClientIdUnique($id)) {
                $id = static::generatePoolClientId();
            }
            $this->_poolClientId = $id;
        }
        return $this->_poolClientId;
    }
671723
public function getUid()
    {
        $session_user_id = $this->user->getId();

        if (!empty($session_user_id)) {
            return (string) $session_user_id;
        }

        $cookie_name = $this->getCookieUserName();
        $cookie_user_id = $this->request->cookie($cookie_name, '', 'string');

        if (!empty($cookie_user_id)) {
            return $cookie_user_id;
        }

        $generated_user_id = '_' . gplcart_string_random(6);
        $this->request->setCookie($cookie_name, $generated_user_id, $this->getCookieLifespan());
        return $generated_user_id;
    }
474522
public function resolveSession()
    {
        $cookie_name = Config::get('session.cookie');
        $session_id = $this->getCookie($cookie_name, true);

        if (!$session_id) {
            return null;
        }

        $this->session->setId($session_id);

        return $this->session;
    }
586119
public function sessionID($id = null)
    {
        $current = Arr::get($_COOKIE, HttpCache::$sessionName, '');

        if ($id === null)
        {
            return $current;
        }

        $this->setCookie(HttpCache::$sessionName, $id
            , ini_get('session.cookie_lifetime')
            , ini_get('session.cookie_path')
            , ini_get('session.cookie_domain')
            , ini_get('session.cookie_secure')
            , ini_get('session.cookie_httponly'));
        $_COOKIE[HttpCache::$sessionName] = $id;
        return $current;
    }
491911
protected function sessionUserId() {
		$userId = null;
		$request = $this->newRequest();

		if ($request->session()->started()) {
			$userId = $request->session()->read($this->_config['sessionUserIdKey']);
		} else {
			$this->log('The Session is not started. This typically means a User is not logged in. In this case there is no Session value for the currently active User and therefore we will set the `creator_id` and `modifier_id` to a null value. As a fallback, we are manually starting the session and reading the `$this->_config[sessionUserIdKey]` value, which is probably not correct.', 'debug');
			try {
				$request->session()->start();
				$userId = $request->session()->read($this->_config['sessionUserIdKey']);
			} catch (RuntimeException $e) {
			}
		}

		return $userId;
	}