Skip to content
Browse files

doc(readme) add usage for client

  • Loading branch information
fffonion committed Dec 27, 2019
1 parent 393a573 commit 9c469653d42b58b226e1575f447636b70ecf22f9
Showing with 35 additions and 2 deletions.
  1. +35 −2
@@ -20,7 +20,7 @@ Table of Contents

This library consits of two parts:
This library consists of two parts:

- `resty.acme.autossl`: automatic lifecycle management of Let's Encrypt certificates
- `resty.acme.client`: Lua implementation of ACME v2 protocol
@@ -195,7 +195,13 @@ See also [Storage Adapters](#storage-adapters) below.

## resty.acme.client

A config table can be passed to ``, the default values are:

**syntax**: *c, err =*

Create a ACMEv2 client.

Default values for `config` are:

default_config = {
@@ -226,6 +232,33 @@ See also [Storage Adapters](#storage-adapters) below.

[Back to TOC](#table-of-contents)

### client:init

**syntax**: *err = client:init()*

Initialize the client, requires availability of cosocket API. This function will
login or register an account.

[Back to TOC](#table-of-contents)

### client:order_certificate

**syntax**: *err = client:order_certificate(domain,...)*

Create a certificate with one or more domains. Note that wildcard domains are not
supported as it can only be verified by [dns-01]( challenge.

[Back to TOC](#table-of-contents)

### client:serve_http_challenge

**syntax**: *client:serve_http_challenge()*

Serve [http-01]( challenge. A common use case will be to
put this as a content_by_* block for `/.well-known` path.

[Back to TOC](#table-of-contents)

## Storage Adapters

0 comments on commit 9c46965

Please sign in to comment.
You can’t perform that action at this time.