mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-05 20:40:21 +00:00
api acme account: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
b1bc9372ec
commit
69060f1a84
@ -12,13 +12,13 @@ use PVE::Tools qw(extract_param);
|
||||
|
||||
use PVE::API2::ACMEPlugin;
|
||||
|
||||
use base qw(PVE::RESTHandler);
|
||||
|
||||
__PACKAGE__->register_method ({
|
||||
subclass => "PVE::API2::ACMEPlugin",
|
||||
path => 'plugins',
|
||||
});
|
||||
|
||||
use base qw(PVE::RESTHandler);
|
||||
|
||||
my $acme_directories = [
|
||||
{
|
||||
name => 'Let\'s Encrypt V2',
|
||||
@ -29,14 +29,11 @@ my $acme_directories = [
|
||||
url => 'https://acme-staging-v02.api.letsencrypt.org/directory',
|
||||
},
|
||||
];
|
||||
|
||||
my $acme_default_directory_url = $acme_directories->[0]->{url};
|
||||
|
||||
my $account_contact_from_param = sub {
|
||||
my ($param) = @_;
|
||||
return [ map { "mailto:$_" } PVE::Tools::split_list(extract_param($param, 'contact')) ];
|
||||
my @addresses = PVE::Tools::split_list(extract_param($_[0], 'contact'));
|
||||
return [ map { "mailto:$_" } @addresses ];
|
||||
};
|
||||
|
||||
my $acme_account_dir = PVE::CertHelpers::acme_account_dir();
|
||||
|
||||
__PACKAGE__->register_method ({
|
||||
|
Loading…
Reference in New Issue
Block a user