@param Request $request

@return mixed Any non-null value
516728
public function getCredentials(Request $request)
    {
        $jwt = $request->query->get('jwt');
        if (!$jwt && $request->headers->has('authorization')) {
            $authorizationHeaderArray = \explode(' ', $request->headers->get('authorization'));
            if (\count($authorizationHeaderArray) > 1) {
                $jwt = $authorizationHeaderArray[1];
            }
        }

        if (!$jwt && $this->devTenant && ($this->kernel->getEnvironment() === 'dev')) {
            $tenant = $this->em->getRepository($this->tenantEntityClass)->find($this->devTenant);
            if ($tenant === null) {
                throw new \RuntimeException(\sprintf('Cant find tenant with id %s - please set atlassian_connect.dev_tenant to false to disable dedicated dev tenant OR add valid id', $this->devTenant));
            }

            $jwt = JWT::encode([
                'iss' => $tenant->getClientKey(),
                'iat' => \time(),
                'exp' => \strtotime('+1 day'),
                'qsh' => QSHGenerator::generate($request->getRequestUri(), 'GET'),
                'sub' => 'admin',
            ], $tenant->getSharedSecret());
        }

        if (!$jwt) {
            return null;
        }

        return ['jwt' => $jwt];
    }
501514
private function isTokenInRequest(Request $request)
    {
        return $request->query->has($this->tokenParam) ||
            $request->attributes->has($this->tokenParam) ||
            $request->request->has($this->tokenParam);
    }
71422
public function detect(Request $request)
	{
		if ($request->isMethod('post')) {
			return $request->request->get($this->parameterName);
		}

		return $request->query->get($this->parameterName);
	}
1175366
public function loadTableFromSession(Request $request)
    {
        $table = $request->getSession()->get(TableModel::buildSessionPath($request));
        if (true === is_string($table)) {
            return unserialize($table);
        }

        return null;
    }
1337432
public function lookup(Request $request)
    {
        $cacheKey = $this->getCacheKey($request);

        $item = $this->cache->getItem($cacheKey);

        if (!$item->isHit()) {
            return null;
        }

        $entries = $item->get();

        foreach ($entries as $varyKeyResponse => $responseData) {
            // This can only happen if one entry only
            if (self::NON_VARYING_KEY === $varyKeyResponse) {
                return $this->restoreResponse($responseData);
            }

            // Otherwise we have to see if Vary headers match
            $varyKeyRequest = $this->getVaryKey(
                $responseData['vary'],
                $request
            );

            if ($varyKeyRequest === $varyKeyResponse) {
                return $this->restoreResponse($responseData);
            }
        }

        return null;
    }
755969
private function getParametersFromRequest(Request $request)
    {
        $parameters = $request->query->all();
        if ($routeParameters = $request->attributes->get('_route_params')) {
            $parameters = array_merge($routeParameters, $parameters);
        }

        return $parameters;
    }
591195
public function fetchToken(Request $request)
    {
        foreach ($this->config->getOperators() as $name) {
            $operator = $this->getOperator($name);

            if ($operator->hasToken($request)) {
                return $operator->fetchToken($request);
            }
        }

        return null;
    }
1284466
public function parse(Request $request)
    {
        if ($request->has($this->name)) {
            $this->applied = true;
            $value         = $request->input($this->name);

            // do not reorder this
            if (substr($value, 0, 1) === '!') {
                $this->operation = '!=';
                $this->value = substr($value, 1);
            } elseif (substr($value, 0, 2) === '>=') {
                $this->operation = '>=';
                $this->value     = substr($value, 2);
            } elseif (substr($value, 0, 2) === '<=') {
                $this->operation = '<=';
                $this->value     = substr($value, 2);
            } elseif (substr($value, 0, 1) === '>') {
                $this->operation = '>';
                $this->value     = substr($value, 1);
            } elseif (substr($value, 0, 1) === '<') {
                $this->operation = '<';
                $this->value     = substr($value, 1);
            } else {
                $this->operation = '=';
                $this->value = $value;
            }

            $this->checkValue();
        }
    }
1208886
protected function fetchID(Request $request): ?string
    {
        $cookies = $request->getCookieParams();
        if (empty($cookies[$this->config->getCookie()])) {
            return null;
        }

        return $cookies[$this->config->getCookie()];
    }
1296109
public static function getMethodIfApiRequest($request)
    {
        $module = Common::getRequestVar('module', '', 'string', $request);
        $method = Common::getRequestVar('method', '', 'string', $request);

        $isApi = $module === 'API' && !empty($method) && (count(explode('.', $method)) === 2);
        return $isApi ? $method : null;
    }
588518
public function getRequest( Request $request ) {
		$response = $this->getClient()->request(
			'GET',
			$this->apiUrl,
			$this->getClientRequestOptions( $request, 'query' )
		);

		return $this->decodeResponse( $response );
	}
889881
private function getContentFromRequest(Request $request): array
    {
        $data = json_decode($request->getContent(), true);
        foreach ($data as $key => $value) {
            if ($value === null || $value === '') {
                unset($data[$key]);
            }
        }
        return $data;
    }
1118493
public function get(Request $request)
    {
        $userEntity = $request->attributes->get('user');

        if ($userEntity === null) {
            $userEntity = $this->getUser();
        } elseif ($userEntity === false) {
            return $this->createNotFoundResponse();
        }

        return $this->userArrayWithoutPassword($userEntity);
    }
26656
public function determineLocale(Request $request)
    {
        return $request->session()->get($this->sessionKey, $this->fallback);
    }
1277459
public function getJsonParams(Request $request)
    {
        $request_params = [];

        if (0 === mb_strpos($request->headers->get('Content-Type'), 'application/json')) {
            $request_params = json_decode($request->getContent(), true);
        }

        return $request_params;
    }
471713
public function parse($request)
    {
        $object = clone $this->requestObject;
        $invalidValues = [];

        foreach ($this->propertyParsers as $propertyParser) {
            try {
                $this->setProperty($request, $object, $propertyParser);
            } catch (InvalidValueException $e) {
                $invalidValues[$propertyParser->getName()] = $e->getMessage();
            }
        }
        $this->checkIfRequestIsValidOrThrowException($invalidValues);

        return $object;
    }
510775
public function get(Request $request, string $key)
    {
        $value = json_decode((string) $this->getSession($request)->get($key), true);

        $this->logger->info('session: get key {key}, exists {exists}', ['key' => $key, 'exists' => (bool) $value]);

        return $value;
    }