Order order = account.newOrder().domain(domain).create();
/** * Adds domain names to the order. * * @param domains * Collection of domain names to be ordered. May be wildcard domains if * supported by the CA. IDN names are accepted and will be ACE encoded * automatically. * @return itself */ public OrderBuilder domains(String... domains) { for (String domain : requireNonNull(domains, "domains")) { domain(domain); } return this; }
/** * Adds domain names to the order. * * @param domains * Collection of domain names to be ordered. May be wildcard domains if * supported by the CA. IDN names are accepted and will be ACE encoded * automatically. * @return itself */ public OrderBuilder domains(String... domains) { for (String domain : requireNonNull(domains, "domains")) { domain(domain); } return this; }
/** * @return The list of challenges with tokens to create webpages for that remote end will call to verify we own the domain */ public CompletableFuture<ProxyOrder> placeOrder(URL accountUrl, KeyPair accountKeyPair) { try { log.info("reestablish account from location="+accountUrl+" and keypair"); Session session = new Session("acme://letsencrypt.org/staging"); Login login = session.login(accountUrl, accountKeyPair); Account account = login.getAccount(); log.info("create an order"); String domainTemp = "something.com"; Order order = account.newOrder() .domain(domainTemp) .create(); checkAuthStatii(order); List<ProxyAuthorization> auths = new ArrayList<>(); for(Authorization auth : order.getAuthorizations()) auths.add(new ProxyAuthorization(auth)); return CompletableFuture.completedFuture(new ProxyOrder(order, auths)); } catch (AcmeException e) { throw new RuntimeException(e); } }