mirror of
https://github.com/shred/acme4j.git
synced 2025-12-13 11:14:02 +08:00
Add Buypass provider
This commit is contained in:
@@ -37,6 +37,26 @@ import org.shredzone.acme4j.exception.AcmeException;
|
||||
*/
|
||||
public class ProviderIT {
|
||||
|
||||
/**
|
||||
* Test Buypass
|
||||
*/
|
||||
@Test
|
||||
public void testBuypass() throws AcmeException, MalformedURLException {
|
||||
var session = new Session("acme://buypass.com");
|
||||
assertThat(session.getMetadata().getWebsite()).hasValue(new URL("https://buypass.com/"));
|
||||
assertThatNoException().isThrownBy(() -> session.resourceUrl(Resource.NEW_ACCOUNT));
|
||||
assertThat(session.getMetadata().isExternalAccountRequired()).isFalse();
|
||||
assertThat(session.getMetadata().isAutoRenewalEnabled()).isFalse();
|
||||
assertThat(session.resourceUrlOptional(Resource.RENEWAL_INFO)).isNotEmpty();
|
||||
|
||||
var sessionStage = new Session("acme://buypass.com/staging");
|
||||
assertThat(sessionStage.getMetadata().getWebsite()).hasValue(new URL("https://buypass.com/"));
|
||||
assertThatNoException().isThrownBy(() -> sessionStage.resourceUrl(Resource.NEW_ACCOUNT));
|
||||
assertThat(sessionStage.getMetadata().isExternalAccountRequired()).isFalse();
|
||||
assertThat(sessionStage.getMetadata().isAutoRenewalEnabled()).isFalse();
|
||||
assertThat(sessionStage.resourceUrlOptional(Resource.RENEWAL_INFO)).isNotEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Google CA
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user