/** * Gets a list of all challenges offered by the server, in no specific order. */ public List<Challenge> getChallenges() { Login login = getLogin(); return Collections.unmodifiableList(getJSON().get("challenges") .asArray() .stream() .map(Value::asObject) .map(login::createChallenge) .collect(toList())); }
/** * Gets a list of all challenges offered by the server, in no specific order. */ public List<Challenge> getChallenges() { Login login = getLogin(); return Collections.unmodifiableList(getJSON().get("challenges") .asArray() .stream() .map(Value::asObject) .map(login::createChallenge) .collect(toList())); }
/** * Permanently deactivates the {@link Authorization}. */ public void deactivate() throws AcmeException { LOG.debug("deactivate"); try (Connection conn = getSession().connect()) { JSONBuilder claims = new JSONBuilder(); claims.put("status", "deactivated"); conn.sendSignedRequest(getLocation(), claims, getLogin()); JSON json = conn.readJsonResponse(); if (json != null) { setJSON(json); } } }
/** * Permanently deactivates the {@link Authorization}. */ public void deactivate() throws AcmeException { LOG.debug("deactivate"); try (Connection conn = getSession().connect()) { JSONBuilder claims = new JSONBuilder(); claims.put("status", "deactivated"); conn.sendSignedRequest(getLocation(), claims, getLogin()); JSON json = conn.readJsonResponse(); if (json != null) { setJSON(json); } } }