docs: static String obfuscateCredentials(String originalUrl, HttpUrl parsedUrl) {
      String username = parsedUrl.username();
      String password = parsedUrl.password();
      if (username.isEmpty() && password.isEmpty()) {
        return originalUrl;
      }
  
      if (!username.isEmpty() && !password.isEmpty()) {
        String encodedUsername = parsedUrl.encodedUsername();
        String encodedPassword = parsedUrl.encodedPassword();
        return Stream.<Supplier<String>>of(
          () -> replaceOrDie(originalUrl, username, password),
          () -> replaceOrDie(originalUrl, encodedUsername, encodedPassword),
          () -> replaceOrDie(originalUrl, encodedUsername, password),
          () -> replaceOrDie(originalUrl, username, encodedPassword))
          .map(Supplier::get)
          .filter(Objects::nonNull)
          .findFirst()
          .orElse(originalUrl);
      }
      if (!username.isEmpty()) {
        return Stream.<Supplier<String>>of(
          () -> replaceOrDie(originalUrl, username, null),
          () -> replaceOrDie(originalUrl, parsedUrl.encodedUsername(), null))
          .map(Supplier::get)
          .filter(Objects::nonNull)
          .findFirst()
          .orElse(originalUrl);
      }
      checkState(password.isEmpty(), "having a password without a username should never occur");
      return originalUrl;
    }