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

NAME

WWW::LetsEncrypt::JWS

SYNOPSIS

use WWW::LetsEncrypt::JWS; use WWW::LetsEncrypt::JWK;

my $JWK = WWW::LetsEncrypt::JWK->new(...);

my $JWS = WWW::LetsEncrypt::JWS->new({jwk => $JWK});

$JWS->payload({ item1 => 'a', });

IOFunction($JWS->serialize());

DESCRIPTION

A (mostly) implemented JSON Web Signature object as per the RFC specification. This object's implementation follows the JWS RFC enough to meet the minimum requirements for ACME, and deviates as ACME may require.

Attributes

'payload' a hashref attribute used to store the json payload that should be communicated to the server.

'headers' a hashref attribute used to store any headers that should be included in the JWS.

'protected_headers' a hashref attribute similar to headers, but are integrity checked, should contain things like the nonce.

'jwk' a JWK object that will used to create a signature of all integrity protected items (payload and protected headers). The public key will also be included in the protected headers of the JWS serialized output.

Public Functions

serialize

Object function that takes all of the set attributes and outputs a flattened JSON Web Signature.

Input

        $self - Object Reference

Output

        scalar string that mostly conforms to the RFC

Private Functions

_serialize_hash

Internal helper function that performs the necessary encoding for the payload and protected-headers.

Input

        \%hash_ref

Output

        scalar string representing the necessary encoding for various JWS elements