Package io.micronaut.acme.services
Class AcmeService
java.lang.Object
io.micronaut.acme.services.AcmeService
Service to contact an ACME server and setup a certificate on a given basis.
-
Constructor Summary
ConstructorDescriptionAcmeService
(io.micronaut.context.event.ApplicationEventPublisher eventPublisher, AcmeConfiguration acmeConfiguration, io.micronaut.core.io.ResourceResolver resourceResolver, io.micronaut.scheduling.TaskScheduler taskScheduler, DnsChallengeSolver dnsChallengeSolver) Constructs a new Acme cert service. -
Method Summary
Modifier and TypeMethodDescriptionGets the current X509Certificate.protected @NonNull Optional<X509Certificate[]>
Returns the full certificate chain.void
orderCertificate
(List<String> domains) Orders a new certificate using ACME protocol.void
Setup the certificate that has been saved to disk and configures it for use.
-
Constructor Details
-
AcmeService
public AcmeService(io.micronaut.context.event.ApplicationEventPublisher eventPublisher, AcmeConfiguration acmeConfiguration, io.micronaut.core.io.ResourceResolver resourceResolver, @Named("scheduled") io.micronaut.scheduling.TaskScheduler taskScheduler, DnsChallengeSolver dnsChallengeSolver) Constructs a new Acme cert service.- Parameters:
eventPublisher
- Application Event PublisherresourceResolver
- Resource resolver for finding keys from classpath or diskacmeConfiguration
- Acme ConfigurationtaskScheduler
- Task scheduler for enabling background polling of the certificate refreshesdnsChallengeSolver
- DNS Challenge Resolver for setting up a DNS challenge
-
-
Method Details
-
getCurrentCertificate
Gets the current X509Certificate.- Returns:
- current domain certificate
-
getFullCertificateChain
Returns the full certificate chain.- Returns:
- array of each of the certificates in the chain
-
orderCertificate
public void orderCertificate(List<String> domains) throws org.shredzone.acme4j.exception.AcmeException Orders a new certificate using ACME protocol.- Parameters:
domains
- List of domains to order a certificate for- Throws:
org.shredzone.acme4j.exception.AcmeException
- if any issues occur during ordering of certificate
-
setupCurrentCertificate
public void setupCurrentCertificate()Setup the certificate that has been saved to disk and configures it for use.
-