Update resource status after authorization deactivation

pull/55/head
Richard Körber 2017-05-03 09:59:22 +02:00
parent 300c9dd06c
commit 0a63c65885
2 changed files with 15 additions and 1 deletions

View File

@ -160,6 +160,8 @@ public class Authorization extends AcmeResource {
conn.sendSignedRequest(getLocation(), claims, getSession());
conn.accept(HttpURLConnection.HTTP_OK);
unmarshalAuthorization(conn.readJsonResponse());
}
}

View File

@ -263,9 +263,21 @@ public class AuthorizationTest {
assertThat(httpStatus, isIntArrayContainingInAnyOrder(HttpURLConnection.HTTP_OK));
return HttpURLConnection.HTTP_OK;
}
@Override
public JSON readJsonResponse() {
return getJSON("updateAuthorizationResponse");
}
};
Authorization auth = new Authorization(provider.createSession(), locationUrl);
Session session = provider.createSession();
Http01Challenge httpChallenge = new Http01Challenge(session);
Dns01Challenge dnsChallenge = new Dns01Challenge(session);
provider.putTestChallenge("http-01", httpChallenge);
provider.putTestChallenge("dns-01", dnsChallenge);
Authorization auth = new Authorization(session, locationUrl);
auth.deactivate();
provider.close();