Download the PHP package tomcan/acmeclient without Composer

On this page you can find all versions of the php package tomcan/acmeclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package acmeclient

AcmeClient library

AcmeClient library is PHP library implementing the Automatic Certificate Management Environment (ACME) protocol, used for requesting certificates from services like Let's Encrypt.

The goal of the project is to create a flexible library that allows you to incorporate certificate registration through ACME in your own application (e.g. SaaS service with customer domains), without the need of an external tool or client.

The library uses interfaces for both what it requires as what it returns, so you have the freedom to implement these interfaces into the already existing classes in your own product. If you don't require that much of an integration, you can also use the built-in classes that can provide the required functionality to get the job done.

Note: the actual validation is not part of the scope of this library. It will tell you what http or DNS challenge to provide, but it's up to you to make sure the given values end up where they need to end up.

(in)completeness

This does not aim to be a full implementation of the RFC, but mainly focuses on the flow of obtaining certificate from ACME compatible services (e.g. Let's Encrypt).

Implemented functionality

Getting started

To get started, you'll need to add the library to your composer-based project.

The client requires a HTTP Client that implements the Symfony\HttpClientInterface (eg. the Symfony HttpClient), as well as the directory URL of the ACME server (defaults to Let's Encrypt), and optionally a logger class implementing the Psr\LoggerInterface interface.

Next, you will need an account on the ACME server. This requires an e-mail address and a RSA key that will be used for signing the requests. If you're using the built-in Account class, it will automatically generate a new key if none is provided. You then need to validate the account with the directory. If it's a new account, it will automatically create the account and return it.

You should save/persist the account information for later use. This could be a simple as writing the info to a json file, or persisting it to database through an ORM. But that's totally up to you to implement that.

Once you have the account, you can create an order, passing an array of domainnames as identifiers. You can then need to authorize the order to obtain the list of authorizations and challenges to complete. You probably want to do some pre-flight checks of your own before authorizing the order, as every authorization needs to be successful in order to get the certificate.

The returned AuthorizationInterface array contains an autorization object for every requested domain. For each authorization at least one challenge needs to be validated. Although multiple challenges are returned, you only need to validate one challenge for each authorization. This can be a HTTP challenge or a DNS challenge. You need to pass both the autorizations as the choosen challenge as arrays, where the index of the authorizations array corresponds to the index of the challenge.

For HTTP challenges, a request will be made to http://{hostname}/.well-known/acme-challenge/{token}. You can obtain the value of token using the getToken() method on the ChallengeInterface object, and the required content using the getValue() method.

For DNS challenges, a DNS TXT record has to be created as _acme-challenge.{hostname}. The value of the DNS record can be obtained using the getValue method on the ChallengeInterface object.

The validate method will return true when all authorizations have been completed, or false if failed. The authorizations and challenges passed to the method will be updated to reflect the status, so you can use them to determine which ones actually succeeded of failed.

If all authorizations are completed, you can finalize the order and obtain the certificate. The client will generate a new private key and csr and pass that to the ACME server. The private key, csr and complete certificate chain will be returned through the CertificateInterface object.

References

https://datatracker.ietf.org/doc/html/rfc8555


All versions of acmeclient with dependencies

PHP Build Version
Package Version
Requires ext-openssl Version *
ext-json Version *
php Version ^8.1
symfony/http-client-contracts Version ^2.0|^3.0
psr/log Version ^2.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tomcan/acmeclient contains the following files

Loading the files please wait ....