- All Known Implementing Classes:
AbstractAcmeProvider,GenericAcmeProvider
public interface AcmeProvider
An
AcmeProvider provides methods to be used for communicating with the ACME
server. Implementations handle individual features of each ACME server.
Provider implementations must be registered with Java's ServiceLoader.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this provider accepts the given server URI.connect(URI serverUri, NetworkSettings networkSettings, HttpClient httpClient) Creates aConnectionfor communication with the ACME server.createChallenge(Login login, JSON data) Creates aChallengeinstance for the given challenge data.default HttpClientcreateHttpClient(NetworkSettings networkSettings) Creates anHttpClientinstance configured with the given network settings.Returns the provider's directory.Returns a proposal for the EAB MAC algorithm to be used.Resolves the server URI and returns the matching directory URL.
-
Method Details
-
accepts
Checks if this provider accepts the given server URI.- Parameters:
serverUri- Server URI to test- Returns:
trueif this provider accepts the server URI,falseotherwise
-
resolve
Resolves the server URI and returns the matching directory URL.- Parameters:
serverUri- ServerURI- Returns:
- Resolved directory
URL - Throws:
IllegalArgumentException- if the serverURIis not accepted
-
createHttpClient
Creates anHttpClientinstance configured with the given network settings.The default implementation creates a standard HttpClient with the network settings. Subclasses can override this method to create a customized HttpClient, for example to configure SSL context or other provider-specific requirements.
- Parameters:
networkSettings- The network settings to use- Returns:
HttpClientinstance- Since:
- 4.0.0
-
connect
Creates aConnectionfor communication with the ACME server.- Parameters:
serverUri- ServerURInetworkSettings-NetworkSettingsto be used for the connectionhttpClient-HttpClientto be used for HTTP requests- Returns:
Connectionthat was generated- Since:
- 4.0.0
-
directory
Returns the provider's directory. The structure must contain resource URLs, and may optionally contain metadata.The default implementation resolves the server URI and fetches the directory via HTTP request. Subclasses may override this method, e.g. if the directory is static.
- Parameters:
session-Sessionto be usedserverUri- ServerURI- Returns:
- Directory data, as JSON object, or
nullif the directory has not been changed since the last request. - Throws:
AcmeException
-
createChallenge
Creates aChallengeinstance for the given challenge data. -
getProposedEabMacAlgorithm
Returns a proposal for the EAB MAC algorithm to be used. Only set if the CA requires External Account Binding and the MAC algorithm cannot be correctly derived from the MAC key. Empty otherwise.- Returns:
- Proposed MAC algorithm to be used for EAB, or empty for the default behavior.
- Since:
- 3.5.0
-