mirror of https://github.com/shred/acme4j
Update resource status after authorization deactivation
parent
300c9dd06c
commit
0a63c65885
|
@ -160,6 +160,8 @@ public class Authorization extends AcmeResource {
|
||||||
|
|
||||||
conn.sendSignedRequest(getLocation(), claims, getSession());
|
conn.sendSignedRequest(getLocation(), claims, getSession());
|
||||||
conn.accept(HttpURLConnection.HTTP_OK);
|
conn.accept(HttpURLConnection.HTTP_OK);
|
||||||
|
|
||||||
|
unmarshalAuthorization(conn.readJsonResponse());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -263,9 +263,21 @@ public class AuthorizationTest {
|
||||||
assertThat(httpStatus, isIntArrayContainingInAnyOrder(HttpURLConnection.HTTP_OK));
|
assertThat(httpStatus, isIntArrayContainingInAnyOrder(HttpURLConnection.HTTP_OK));
|
||||||
return 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();
|
auth.deactivate();
|
||||||
|
|
||||||
provider.close();
|
provider.close();
|
||||||
|
|
Loading…
Reference in New Issue