private void getChallengeQuestionHeaders()

in src/main/java/com/microsoft/azure/proton/transport/proxy/impl/DigestProxyChallengeProcessorImpl.java [88:111]


    private void getChallengeQuestionHeaders(String line, Map<String, String> challengeQuestionValues) {
        final String context = line.substring(PROXY_AUTH_DIGEST.length());
        final String[] headerValues = context.split(",");

        if (logger.isInfoEnabled()) {
            logger.info("Fetching challenge questions.");
        }

        for (String headerValue : headerValues) {
            if (headerValue.contains("=")) {
                String key = headerValue.substring(0, headerValue.indexOf("="));
                String value = headerValue.substring(headerValue.indexOf("=") + 1);
                challengeQuestionValues.put(key.trim(), value.replaceAll("\"", "").trim());
            }
        }

        if (logger.isInfoEnabled()) {
            logger.info("Challenge questions are: ");

            challengeQuestionValues.forEach((key, value) -> {
                logger.info("{}: {}", key, value);
            });
        }
    }