acme-client: Add Active24 challenge type

This commit is contained in:
Jan Winkler
2022-07-27 11:09:26 +02:00
parent 0be58a3abb
commit 4025ed6571
3 changed files with 58 additions and 0 deletions
@@ -130,6 +130,16 @@
<type>text</type>
<help>The time in seconds to wait for all the TXT records to take effect after adding them to the DNS API. Defaults to 120 seconds.</help>
</field>
<field>
<label>Active24</label>
<type>header</type>
<style>table_dns table_dns_active24</style>
</field>
<field>
<id>validation.dns_active24_token</id>
<label>Token</label>
<type>text</type>
</field>
<field>
<label>Alwaysdata</label>
<type>header</type>
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2022 Jan Winkler
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\AcmeClient\LeValidation;
use OPNsense\AcmeClient\LeValidationInterface;
use OPNsense\Core\Config;
/**
* ACTIVE24 API
* @package OPNsense\AcmeClient
*/
class DnsActive24 extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['ACTIVE24_Token'] = (string)$this->config->dns_active24_token;
}
}
@@ -419,6 +419,7 @@
<dns_1984hosting>1984Hosting API</dns_1984hosting>
<dns_acmedns>ACME DNS API</dns_acmedns>
<dns_acmeproxy>Acmeproxy API</dns_acmeproxy>
<dns_active24>Active24 API</dns_active24>
<dns_ad>Alwaysdata.com API</dns_ad>
<dns_ali>aliyun.com API</dns_ali>
<dns_kas>All-Inkl.com domain API</dns_kas>
@@ -507,6 +508,9 @@
<ValidationMessage>Please specify a value between 1 and 84600.</ValidationMessage>
<Required>Y</Required>
</dns_sleep>
<dns_active24_token type="TextField">
<Required>N</Required>
</dns_active24_token>
<dns_ad_key type="TextField">
<Required>N</Required>
</dns_ad_key>