private Set getAuthenticationTypes()

in src/main/java/com/microsoft/azure/proton/transport/proxy/impl/ProxyImpl.java [528:549]


        private Set<ProxyAuthenticationType> getAuthenticationTypes(Map<String, List<String>> headers) {
            if (!headers.containsKey(PROXY_AUTHENTICATE)) {
                return Collections.emptySet();
            }

            final Set<ProxyAuthenticationType> supportedTypes = new HashSet<>();
            final List<String> authenticationTypes = headers.get(PROXY_AUTHENTICATE);

            for (String type : authenticationTypes) {
                final String lowercase = type.toLowerCase(Locale.ROOT);

                if (lowercase.startsWith(Constants.BASIC_LOWERCASE)) {
                    supportedTypes.add(BASIC);
                } else if (lowercase.startsWith(Constants.DIGEST_LOWERCASE)) {
                    supportedTypes.add(DIGEST);
                } else {
                    LOGGER.warn("Did not understand this authentication type: {}", type);
                }
            }

            return supportedTypes;
        }