All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.micronaut.acme.challenge.dns.DnsChallengeSolver Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2017-2021 original authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.micronaut.acme.challenge.dns;

import io.micronaut.context.annotation.DefaultImplementation;

/**
 * Represents a solver for the DNS challenge that can create and destroy
 * DNS records.
 */
@DefaultImplementation(RenderedTextDnsChallengeSolver.class)
public interface DnsChallengeSolver {
    /**
     * Creates the TXT record for `_acme-challenge.domain`
     * with a value of digest to verify the domain.
     *
     * 

This method should block and only return once the TXT record has been * created, however {@see io.micronaut.acme.AcmeConfiguration} `pause` setting can also be * used to provide time for propagation.

* * @param domain The domain to create the record for, excluding the `_acme-challenge` key * @param digest The value to set the TXT record to for the challenge to succeed */ void createRecord(String domain, String digest); /** * Remove the TXT record previously created for the challenge. * *

This method is called even if the challenge failed, so it is possible the record may not exist.

* * @param domain The domain to remove the record for, excluding the `_acme-challenge` key */ void destroyRecord(String domain); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy