code: public void setBasicUsernamePassword(String username, String password) {
          this.username = username;
          this.password = password;
          LOG.debug("use basic username/password {}/********", username);
  
          userPassCredentialsProvider = new BasicCredentialsProvider();
          userPassCredentialsProvider.setCredentials(AuthScope.ANY,
              new UsernamePasswordCredentials(username, password));
  
          authCache = new BasicAuthCache();
          BasicScheme basicAuth = new BasicScheme();
          authCache.put(httpHost, basicAuth);
      }
docs: Calls this to provide username and password. This will use Basic authentication, with a header such as
  "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
  
  @param username user name
  @param password password