protected function extractAdUsername(Request $request, $value)
    {
        $pattern = "/((?m)(?<=\b".self::COOKIE_FIELD_NAME."=)[^;]*)/i";
        preg_match($pattern, $value, $matches);

        if ($matches) {
            $request->attributes->set(self::CONFIGURATION_PARAMETER_USER_ID, $matches[0]);

            return $matches[0];
        }

        return $value;
    }