final String prefix)
{
if (authenticationConfig != null) {
AuthenticationConfigMarshaller marshaller = authenticationConfigMarshallers.get(authenticationConfig.getType());
if (marshaller != null) {
Map<String, Object> authMap = checkNotNull(marshaller.toMap(authenticationConfig), "configuration map");
putIfNotNull(configMap, prefix + ".authentication.type", authenticationConfig.getType());
for (Entry<String, Object> entry : authMap.entrySet()) {
putIfNotNull(configMap, prefix + ".authentication." + entry.getKey(), entry.getValue());
}
}