mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 02:23:23 +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 PVE::API2::ACMEPlugin;
|
||||||
|
|
||||||
|
use base qw(PVE::RESTHandler);
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
subclass => "PVE::API2::ACMEPlugin",
|
subclass => "PVE::API2::ACMEPlugin",
|
||||||
path => 'plugins',
|
path => 'plugins',
|
||||||
});
|
});
|
||||||
|
|
||||||
use base qw(PVE::RESTHandler);
|
|
||||||
|
|
||||||
my $acme_directories = [
|
my $acme_directories = [
|
||||||
{
|
{
|
||||||
name => 'Let\'s Encrypt V2',
|
name => 'Let\'s Encrypt V2',
|
||||||
@ -29,14 +29,11 @@ my $acme_directories = [
|
|||||||
url => 'https://acme-staging-v02.api.letsencrypt.org/directory',
|
url => 'https://acme-staging-v02.api.letsencrypt.org/directory',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
my $acme_default_directory_url = $acme_directories->[0]->{url};
|
my $acme_default_directory_url = $acme_directories->[0]->{url};
|
||||||
|
|
||||||
my $account_contact_from_param = sub {
|
my $account_contact_from_param = sub {
|
||||||
my ($param) = @_;
|
my @addresses = PVE::Tools::split_list(extract_param($_[0], 'contact'));
|
||||||
return [ map { "mailto:$_" } PVE::Tools::split_list(extract_param($param, 'contact')) ];
|
return [ map { "mailto:$_" } @addresses ];
|
||||||
};
|
};
|
||||||
|
|
||||||
my $acme_account_dir = PVE::CertHelpers::acme_account_dir();
|
my $acme_account_dir = PVE::CertHelpers::acme_account_dir();
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
|
Loading…
Reference in New Issue
Block a user