code: private void setupAuthMode() {
      String apiKey = getStringProperty(P_APIKEY);
      if (Strings.isNullOrEmpty(apiKey)) {
        // try to use the user/pass mode instead
        forceUserPassAuthMode(getStringProperty(P_USERNAME), getStringProperty(P_PASSWORD));
      } else {
        // ok the key is present, let's use it
        forceKeyAuthMode(apiKey);
      }
    }
docs: Setup the auth mode using the properties file.
  If the "apikey" key is present and not empty it will be used, otherwise the fallback
  to user/pass mode is triggered. Please note that {@link PropertiesConfiguration} is NOT smart,
  it will not try to fetch apiKey when configuring the app from a properties file and finding only user/pass data!