if (index == -1) {
ret.add(createAuthMethodConfig(part, replacements));
} else {
final String name = part.substring(0, index);
Map<String, Deque<String>> props = QueryParameterUtils.parseQueryString(part.substring(index + 1));
final AuthMethodConfig authMethodConfig = createAuthMethodConfig(name, replacements);
for (Map.Entry<String, Deque<String>> entry : props.entrySet()) {
Deque<String> val = entry.getValue();
if (val.isEmpty()) {
authMethodConfig.getProperties().put(URLDecoder.decode(entry.getKey(), UTF_8), "");
} else {
authMethodConfig.getProperties().put(URLDecoder.decode(entry.getKey(), UTF_8), URLDecoder.decode(val.getFirst(), UTF_8));
}
}
ret.add(authMethodConfig);
}
}