NAME
Net::ACME::Authorization::Pending - pending ACME authorization
SYNOPSIS
my
$authz_p
= Net::ACME::Authorization::Pending->new(
challenges
=> \
@challenge_objects
,
combinations
=> [
[ 2 ],
[ 1 ],
[ 0 ],
],
);
for
my
$cmb
(
$authz_p
->combinations() ) {
#An example of only doing “http-01”:
next
if
@$cmb
> 1;
next
if
$cmb
->[0]->type() ne
'http-01'
;
#Prepare for the challenge …
#Assume we instantiated Net::ACME above …
$acme
->do_challenge(
$cmb
->[0]);
while
(1) {
if
(
$authz_p
->is_time_to_poll()) {
my
$poll
=
$authz_p
->poll();
last
if
$poll
->status() eq
'valid'
;
if
(
$poll
->status() eq
'invalid'
) {
my
$completed_challenge
= (
$poll
->challenges())[0];
$completed_challenge
->error()->detail() . $/;
die
"Failed authorization!$/"
;
}
}
sleep
1;
}
last
;
}