code: protected synchronized MavenModelControllerClientConfiguration getClientConfiguration() {
          final Log log = getLog();
          String username = this.username;
          String password = this.password;
          if (username == null && password == null) {
              if (id != null) {
                  if (settings != null) {
                      Server server = settings.getServer(id);
                      if (server != null) {
                          log.debug(DEBUG_MESSAGE_SETTINGS_HAS_ID);
                          password = decrypt(server);
                          username = server.getUsername();
                          if (username != null && password != null) {
                              log.debug(DEBUG_MESSAGE_SETTINGS_HAS_CREDS);
                          } else {
                              log.debug(DEBUG_MESSAGE_NO_CREDS);
                          }
                      } else {
                          log.debug(DEBUG_MESSAGE_NO_SERVER_SECTION);
                      }
                  } else {
                      log.debug(DEBUG_MESSAGE_NO_SETTINGS_FILE);
                  }
              } else {
                  log.debug(DEBUG_MESSAGE_NO_ID);
              }
          } else {
              log.debug(DEBUG_MESSAGE_POM_HAS_CREDS);
          }
          final ModelControllerClientConfiguration.Builder builder = new ModelControllerClientConfiguration.Builder()
                  .setProtocol(protocol)
                  .setHostName(hostname)
                  .setPort(port)
                  .setConnectionTimeout(timeout * 1000);
          if (authenticationConfig != null) {
              try {
                  builder.setAuthenticationConfigUri(authenticationConfig.toURI());
              } catch (URISyntaxException e) {
                  throw new RuntimeException("Failed to create URI from " + authenticationConfig, e);
              }
          }
          return new MavenModelControllerClientConfiguration(builder.build(), username, password);
      }
docs: Gets a client configuration used to create a new {@link ModelControllerClient}.
  
  @return the configuration to use