Calls the getters parser and returns the token

@return string
517935
public function parse() : string
	{
		foreach($this->getters as $getter) 
		{
			$token = $getter->parse();
			if($token) {
				return $token;
			}
		}
		return '';
	}
369911
public function getToken()
    {
        $payload = array(
            $this->serializer->toBase64URL($this->serializer->toJSON($this->headers)),
            $this->serializer->toBase64URL($this->serializer->toJSON($this->claims))
        );

        if ($this->signature !== null) {
            $payload[] = $this->serializer->toBase64URL($this->signature);
        }

        return new Token($this->headers, $this->claims, $this->signature, $payload);
    }
274374
protected function getTokenTitle()
    {
        $token      = $this->getToken();
        $respondent = $token->getRespondent();

        // Set params
        return sprintf(
                $this->_('Token %s in round "%s" in track "%s" for respondent nr %s: %s'),
                $token->getTokenId(),
                $token->getRoundDescription(),
                $token->getTrackName(),
                $respondent->getPatientNumber(),
                $respondent->getName()
                );
    }
1132000
public function getParser()
    {
        if (!$this->parser) {
            $this->setParser(Injector::inst()->get('SilverStripe\\View\\SSTemplateParser'));
        }
        return $this->parser;
    }
1233359
public function getRequestToken()
    {
        // Nullify any request token we already have
        $this->storage->set(null, 'request_token');
        $url = API::API_URL . self::REQUEST_TOKEN_METHOD;
        $response = $this->fetch('POST', $url, '');
        $token = $this->parseTokenString($response['body']);
        $this->storage->set($token, 'request_token');
    }
692596
protected function _getNextToken()
    {
        $this->token      = self::EOF;
        $this->tokenValue = null;
        $this->_eatWhitespace();

        if ($this->offset >= $this->sourceLength) {
            return(self::EOF);
        }

        $str       = $this->source;
        $strLength = $this->sourceLength;
        $i         = $this->offset;
        $start     = $i;

        switch ($str{$i}) {
            case '{':
                $this->token = self::LBRACE;
                break;
            case '}':
                $this->token = self::RBRACE;
                break;
            case '[':
                $this->token = self::LBRACKET;
                break;
            case ']':
                $this->token = self::RBRACKET;
                break;
            case ',':
                $this->token = self::COMMA;
                break;
            case ':':
                $this->token = self::COLON;
                break;
            case '"':
                $result = '';
                do {
                    $i++;
                    if ($i >= $strLength) {
                        break;
                    }

                    $chr = $str{$i};

                    if ($chr == '\\') {
                        $i++;
                        if ($i >= $strLength) {
                            break;
                        }
                        $chr = $str{$i};
                        switch ($chr) {
                            case '"':
                                $result .= '"';
                                break;
                            case '\\':
                                $result .= '\\';
                                break;
                            case '/':
                                $result .= '/';
                                break;
                            case 'b':
                                $result .= "\x08";
                                break;
                            case 'f':
                                $result .= "\x0c";
                                break;
                            case 'n':
                                $result .= "\x0a";
                                break;
                            case 'r':
                                $result .= "\x0d";
                                break;
                            case 't':
                                $result .= "\x09";
                                break;
                            case '\'':
                                $result .= '\'';
                                break;
                            default:
                                throw new RuntimeException("Illegal escape sequence '{$chr}'");
                        }
                    } elseif ($chr == '"') {
                        break;
                    } else {
                        $result .= $chr;
                    }
                } while ($i < $strLength);

                $this->token = self::DATUM;
                //$this->tokenValue = substr($str, $start + 1, $i - $start - 1);
                $this->tokenValue = $result;
                break;
            case 't':
                if (($i+ 3) < $strLength && substr($str, $start, 4) == "true") {
                    $this->token = self::DATUM;
                }
                $this->tokenValue = true;
                $i += 3;
                break;
            case 'f':
                if (($i+ 4) < $strLength && substr($str, $start, 5) == "false") {
                    $this->token = self::DATUM;
                }
                $this->tokenValue = false;
                $i += 4;
                break;
            case 'n':
                if (($i+ 3) < $strLength && substr($str, $start, 4) == "null") {
                    $this->token = self::DATUM;
                }
                $this->tokenValue = null;
                $i += 3;
                break;
        }

        if ($this->token != self::EOF) {
            $this->offset = $i + 1; // Consume the last token character
            return($this->token);
        }

        $chr = $str{$i};
        if ($chr == '-' || $chr == '.' || ($chr >= '0' && $chr <= '9')) {
            if (preg_match('/-?([0-9])*(\.[0-9]*)?((e|E)((-|\+)?)[0-9]+)?/s', $str, $matches, PREG_OFFSET_CAPTURE, $start) && $matches[0][1] == $start) {
                $datum = $matches[0][0];

                if (is_numeric($datum)) {
                    if (preg_match('/^0\d+$/', $datum)) {
                        throw new RuntimeException("Octal notation not supported by JSON (value: {$datum})");
                    } else {
                        $val  = intval($datum);
                        $fVal = floatval($datum);
                        $this->tokenValue = ($val == $fVal ? $val : $fVal);
                    }
                } else {
                    throw new RuntimeException("Illegal number format: {$datum}");
                }

                $this->token = self::DATUM;
                $this->offset = $start + strlen($datum);
            }
        } else {
            throw new RuntimeException('Illegal Token');
        }

        return $this->token;
    }
39530
public function getToken()
    {
        if (! $this->token) {
            try {
                $this->parseToken();
            } catch (JwTException $e) {
                return false;
            }
        }

        return $this->token;
    }
1080788
public function parse(Token $token)
    {
        $value = $this->tokenizer->detokenize($token->getValue());
        $realValue = preg_replace('/^<\((.*)\)>$/', '<identity($1)>', $value);

        return $this->decoratedTokenParser->parse(
            new Token($realValue, new TokenType(TokenType::FUNCTION_TYPE))
        );
    }
1354649
public function getQueryString()
    {
        $query = parent::getQueryString();
        if ($query) {
            $query .= '&';
        }

        $query .= 'rt=' . $this->tokenManager->getToken($this->tokenName)->getValue();

        return $query;
    }
148595
public function getParser()
    {
        if (!isset($this->parser)) {
            $this->parser = new Parser($this);
        }
        return $this->parser;
    }
41831
protected function parseLanguage()
    {
        $token = $this->expectTokenType('Language');

        if (null === $this->languageSpecifierLine) {
            $this->lexer->analyse($this->input, $token['value']);
            $this->languageSpecifierLine = $token['line'];
        } elseif ($token['line'] !== $this->languageSpecifierLine) {
            throw new ParserException(sprintf(
                'Ambiguous language specifiers on lines: %d and %d%s',
                $this->languageSpecifierLine,
                $token['line'],
                $this->file ? ' in file: ' . $this->file : ''
            ));
        }

        return $this->parseExpression();
    }
1226080
public function tokenize()
    {
        $this->inputStream->reset();

        $tokens = [];

        while ($token = $this->readToken()) {
            $tokens[] = $token;
        }

        return $tokens;
    }
547162
public function token()
    {
        $response = $this->oauthServer->handleTokenRequest(Request::createFromGlobals());
        if (!$response->isSuccessful()) {
            return $this->response->sendError(
                ResponseCodes::AUTH_ERROR,
                $response->getStatusCode(),
                $response->getParameter('error_description')
            );
        } else {
            return $this->response->sendSuccess($response->getParameters());
        }
    }
757025
public function parse() : string
	{
		$raw_token = $this->_Request->getHeader($this->key);

		if(!$raw_token) {
			return '';
		}

		return trim( str_ireplace($this->prefix, '', $raw_token));
	}
1287924
static public function getToken()
    {
        if ( self::$token === null )
        {
            self::$token = sha1( self::getSecret() . self::getIntention() . session_id() );
        }

        return self::$token;
    }
1105189
public function getTokens()
    {
        preg_match_all("/(\:\w+)/", $this->getSchema(), $matches);
        $tokens = array();

        foreach ($matches[0] as $match) {
            $tokens[$match] = array();
        }

        return $tokens;
    }
1152292
public function readToken(): Token
    {
        if ($this->isEnd()) {
            throw new LogicException("The end of buffer is reached");
        }
        $token = $this->getTokenAtIndex($this->cursor);
        $this->cursor++;
        return $token;
    }