The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::LetsEncrypt::Message::Authorization

SYNOPSIS

        use WWW::LetsEncrypt::Message::Authorization;

        my $JWK = ...;
        my $AuthMsg = WWW::LetsEncrypt::Message::Authorization->new({
                challenge => 'http-01',     # Optional,
                domain    => 'example.tld', # Required,
        });

        # Step 1: Request Auth Token
        my $result = $AuthMsg->do_request();
        die 'failed' if !$result->{successful};
        my $challenge_token_name = $result->{token};
        my $challenge_token_data = $result->{content};

        # Do a thing to make token/content consumable by Let's Encrypt
        # (eg: populate .well-known/acme/$challenge_token_name with $challenge_token_data

        # Step 2: Submit Auth Challenge
        $result = $AuthMsg->do_request()
        die 'failed' if !$result->{successful};

        # Step 3...: Polling
        $result = $AuthMsg->do_request();
        ...
        #sleep maybe?
        goto 3 or not

DESCRIPTION

        This class provides an method for authorizing a domain, currently by http-01.

Attributes

(Includes all attributes inherited from WWW::LetsEncrypt::Message)

challenge
        an attribute that holds a string of the challenge method.
        Current implemented methods include:
http-01 (the renamed simpleHttp)
dns-01
domain
        a string attribute that holds the domain you are trying to authorize.