Returns peeked token.

@return Token
499549
public function getPeek()
    {
        if (!$this->peeking) {
            $this->peeked = $this->getNext();
            $this->peeking = true;
        }

        return $this->peeked;
    }
1103058
public function generateToken()
    {
        $token = Mage::helper('core')->getRandomString(16);
        $this->addCookie(self::COOKIE_TOKEN, $token);
        $this->addCookie(self::COOKIE_TOKEN_CHECKSUM, $this->getChecksum(array('token' => $token)));
        return $this;
    }
682406
public function getToken()
    {
        if(!isset($this->__token))
        {
            $token   = false;
            $request = $this->getObject('request');

            if($request->headers->has('X-XSRF-Token')) {
                $token = $request->headers->get('X-XSRF-Token');
            }

            if($request->headers->has('X-CSRF-Token')) {
                $token = $request->headers->get('X-CSRF-Token');
            }

            if($request->data->has('csrf_token')) {
                $token = $request->data->get('csrf_token', 'sha1');
            }

            $this->__token = $token;
        }

        return $this->__token;
    }
780641
public function getAuthToken()
    {
        if(!isset($this->__token))
        {
            $token   = false;
            $request = $this->getObject('request');

            if($request->headers->has('Authorization'))
            {
                $header = $request->headers->get('Authorization');

                if(stripos($header, 'jwt') === 0) {
                    $token = substr($header , 4);
                }
            }

            if($request->isSafe())
            {
                if($request->query->has('auth_token')) {
                    $token = $request->query->get('auth_token', 'url');
                }
            }
            else
            {
                if($request->data->has('auth_token')) {
                    $token = $request->data->get('auth_token', 'url');
                }
            }

            if($token) {
                $token = $this->getObject('lib:http.token')->fromString($token);
            }

            $this->__token = $token;
        }

        return $this->__token;
    }
1237754
public function getToken()
    {
        $token = $this->cache->get($this->tokenName);
        if ($token === false) {
            $token = Algorithms::generateRandomToken(20);
            $this->storeToken($token);
        }
        return $token;
    }
322000
protected function getToken()
  {
    return $this->getRequest()->cookies->get($this->getTokenVar(), $this->getSession()->get($this->getTokenVar()));
  }
342085
public function getTokens()
    {
        $response = $this->client->post($this->uri());

        return $this->handleResponse($response);
    }
74964
public function getToken()
    {
        if (!$this->token) {
            $session = new Session('Auth');
            if (!$session->token) {
                $session->token = uniqid();
            }
            $this->token = $session->token;
        }
        return $this->token;
    }
944005
public function getNewToken()
    {
        $post = array(
            'auth' => array(
                'username' => $this->username,
                'password' => $this->password,
            ),
        );
        return $this->http->call(HttpMethod::POST, $this->host.'/auth', $post)->token;
    }
1136701
public function getToken()
  {

    if ($this->has('token'))
    {
      return $this->get('token');
    }

    if ($this->has('access_token'))
    {
      return $this->get('access_token');
    }

    if ($this->has('accessToken'))
    {
      return $this->get('accessToken');
    }

    if ($authorization = $this->getHeader('AUTHORIZATION'))
    {
      return $authorization;
    }

    return null;
  }
373039
public function generateNewToken() {
        $client = $this->getClient();
        $nodeConfig = $this->container->get('nodeConfig');

        $token = new SecurityToken($client, $nodeConfig['ymlkey'], $client->getRoles());

        return $token;
    }
716762
protected function getTokenFromCache()
    {
        if (!$this->cache || !$this->cache->hasItem(self::TOKEN_CACHE_KEY)) {
            return null;
        }

        /** @var Token $token */
        $token = $this->cache->getItem(self::TOKEN_CACHE_KEY)->get();

        if (!$token || !$token->getAuth()) {
            $this->logger->debug('No token in cache or auth is empty, returning null.');

            return null;
        }

        // invalidate token
        if ($this->isTokenExpired($token)) {
            $this->logger->debug('Token is expired.');

            $this->writeTokenInfoToDebugLog();

            return null;
        }

        return $token;
    }
72608
protected function getTokenFromCookie()
    {
        $cookies = $this->getCookies();
        if (!empty($cookies['token']) && $cookies['token']['expiration'] > time()) {
            return $cookies['token']['value'];
        }

        return null;
    }
766344
private function getAuthToken()
    {
        // Generate a new token if current is expired or empty
        if (!$this->token || new \DateTime() > $this->tokenExpireTime) {
            $this->requestToken();
        }

        return $this->token;
    }
1198869
protected function getBuffer(): TokenBuffer
    {
        if (null === $this->buffer) {
            $this->buffer = TokenBuffer::factory();
        }
        return $this->buffer;
    }
561245
public function getAccessToken() {
    $token = self::$auth->getAccessToken();
    return (null == $token || 'null' == $token) ? null : $token;
  }
231509
public function getToken()
    {
        $auth = $this->request->getHeader('Authorization');

        if (!$auth) {
            return null;
        }

        if ('bearer ' !== strtolower(substr($auth, 0, 7))) {
            return null;
        }

        return substr($auth, 7);
    }