acme-client: Add Mythic Beasts API for challenge types

This commit is contained in:
Jan Winkler
2022-08-09 12:16:35 +02:00
parent 684715cac9
commit 74d625633b
3 changed files with 67 additions and 0 deletions
@@ -818,6 +818,21 @@
<type>text</type>
<help>MailinaBox Server FQDN</help>
</field>
<field>
<label>Mythic Beasts</label>
<type>header</type>
<style>table_dns table_dns_mythic_beasts</style>
</field>
<field>
<id>validation.dns_mythic_beasts_key</id>
<label>Key</label>
<type>text</type>
</field>
<field>
<id>validation.dns_mythic_beasts_secret</id>
<label>Secret</label>
<type>text</type>
</field>
<field>
<label>Namecheap</label>
<type>header</type>
@@ -0,0 +1,45 @@
<?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;
/**
* Mythic Beasts API
* @package OPNsense\AcmeClient
*/
class DnsMythicbeasts extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['MB_AK'] = (string)$this->config->dns_mythic_beasts_key;
$this->acme_env['MB_AS'] = (string)$this->config->dns_mythic_beasts_secret;
}
}
@@ -473,6 +473,7 @@
<dns_loopia>Loopia</dns_loopia>
<dns_lua>LuaDNS.com</dns_lua>
<dns_miab>MailinaBox</dns_miab>
<dns_mythic_beasts>Mythic Beasts</dns_mythic_beasts>
<dns_namecom>Name.com</dns_namecom>
<dns_namecheap>Namecheap</dns_namecheap>
<dns_namesilo>Namesilo.com</dns_namesilo>
@@ -832,6 +833,12 @@
<dns_me_secret type="TextField">
<Required>N</Required>
</dns_me_secret>
<dns_mythic_beasts_key type="TextField">
<Required>N</Required>
</dns_mythic_beasts_key>
<dns_mythic_beasts_secret type="TextField">
<Required>N</Required>
</dns_mythic_beasts_secret>
<dns_namecheap_user type="TextField">
<Required>N</Required>
</dns_namecheap_user>