code: public static List<CredentialParams> manyFromConfig(ConfigParams config, boolean configAsDefault) {
  		List<CredentialParams> result = new ArrayList<CredentialParams>();
  
  		// Try to get multiple credentials first
  		ConfigParams credentials = config.getSection("credentials");
  
  		if (credentials.size() > 0) {
  			List<String> sectionsNames = credentials.getSectionNames();
  
  			for (String section : sectionsNames) {
  				ConfigParams credential = credentials.getSection(section);
  				result.add(new CredentialParams(credential));
  			}
  		}
  		// Then try to get a single connection
  		else {
  			ConfigParams credential = config.getSection("credential");
  			if (credential.size() > 0)
  				result.add(new CredentialParams(credential));
  			// Apply defaults
  			else if (configAsDefault)
  				result.add(new CredentialParams(config));
  		}
  
  		return result;
  	}
docs: Retrieves all CredentialParams from configuration parameters from
  "credentials" section. If "credential" section is present instead, than it
  returns a list with only one CredentialParams.
  
  @param config          a configuration parameters to retrieve credentials
  @param configAsDefault boolean parameter for default configuration. If "true"
  the default value will be added to the result.
  @return a list of retrieved CredentialParams