Class AbstractAcmeProvider

All Implemented Interfaces:
Direct Known Subclasses:

public abstract class AbstractAcmeProvider extends Object implements AcmeProvider
Abstract implementation of AcmeProvider. It consists of a challenge registry and a standard HttpConnector.

Implementing classes must implement at least AcmeProvider.accepts(URI) and AcmeProvider.resolve(URI).

  • Constructor Details

  • Method Details

    • connect

      public Connection connect(URI serverUri)
      Description copied from interface: AcmeProvider
      Creates a Connection for communication with the ACME server.
      Specified by:
      connect in interface AcmeProvider
      serverUri - Server URI
      Connection that was generated
    • directory

      public JSON directory(Session session, URI serverUri) throws AcmeException
      Description copied from interface: AcmeProvider
      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.

      Specified by:
      directory in interface AcmeProvider
      session - Session to be used
      serverUri - Server URI
      Directory data, as JSON object, or null if the directory has not been changed since the last request.
    • createChallenge

      public Challenge createChallenge(Login login, JSON data)
      Creates a Challenge instance for the given challenge data.

      This implementation handles the standard challenge types. For unknown types, generic Challenge or TokenChallenge instances are created.

      Custom provider implementations may override this method to provide challenges that are unique to the provider.

      Specified by:
      createChallenge in interface AcmeProvider
      login - Login to bind the challenge to
      data - Challenge JSON data
      Challenge instance, or null if this provider is unable to generate a matching Challenge instance.
    • createHttpConnector

      Creates a HttpConnector.

      Subclasses may override this method to configure the HttpConnector.