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

NAME

Mojolicious::Plugin::ACME - ACME client integration for your Mojolicious app

SYNOPSIS

  use Mojolicious::Lite;

  # optionally load config in application config
  # shown directly below but config plugins work too
  my %acme = (...);
  app->config->{acme} = \%acme;

  plugin 'ACME';

DESCRIPTION

Establishes a route at the top level of your application to handle the challenge request from the application server. Also loads configuration which is reused at multiple levels of the ACME cycle.

CONFIGURATION

Mojolicious::Plugin::ACME is configured via a key named acme in your application's config method. The value should be a hash reference of configuration. If one is not passed in, one will be created for later inspection.

The recognized keys within that hash are:

authorities

A hash reference containing keys which identify certificate authorities used by "ca" and values which can be used to initialize an instance of Mojo::ACME::CA. Any hashreference provided will be merged on top of the defaults which currently contains one entry: letsencrypt.

ca

The certificate authority to use for issuance. This may be a hash reference suitable for constructing an instance of Mojo::ACME::CA, a pre-initialized instance or subclass thereof, or else a string. In the case of a string, this key must exist in "authorities". The default is the string letsencrypt.

challenge_url

A url suitable to be passed to "listen" in Mojo::Server::Daemon. This url is used by the client and server for the application server to forward challenge requests. The default is 127.0.0.1:5000.

NOTES

Please note that the application's first secret is used as a mechanism of signing messages between the ACME client and the application server. This may be configurable eventually but is not yet.

Early versions of this module used the name cas rather than "authorities".