docs: public String register(RegistrationRequest request, User registrar) throws RegistrationException, InvalidArgumentException {
  
          if (cryptoSuite == null) {
              throw new InvalidArgumentException("Crypto primitives not set.");
          }
  
          if (Utils.isNullOrEmpty(request.getEnrollmentID())) {
              throw new InvalidArgumentException("EntrollmentID cannot be null or empty");
          }
  
          if (registrar == null) {
              throw new InvalidArgumentException("Registrar should be a valid member");
          }
          logger.debug(format("register  url: %s, registrar: %s", url, registrar.getName()));
  
          setUpSSL();
  
          try {
              String body = request.toJson();
              JsonObject resp = httpPost(url + HFCA_REGISTER, body, registrar);
              String secret = resp.getString("secret");
              if (secret == null) {
                  throw new Exception("secret was not found in response");
              }
              logger.debug(format("register  url: %s, registrar: %s done.", url, registrar));
              return secret;
          } catch (Exception e) {
  
              RegistrationException registrationException = new RegistrationException(format("Error while registering the user %s url: %s  %s ", registrar, url, e.getMessage()), e);
              logger.error(registrar);
              throw registrationException;
  
          }
  
      }