update docs

This commit is contained in:
AJ ONeal 2018-05-12 19:22:09 -06:00
parent 8311d9275c
commit 09d69c521f
1 changed files with 16 additions and 4 deletions

View File

@ -8,7 +8,7 @@ le-challenge-dns
| [acme-v2.js](https://git.coolaj86.com/coolaj86/acme-v2.js)
|
A manual (interactive CLI) dns-based strategy for node-letsencrypt for setting, retrieving,
A manual (interactive CLI) dns-based strategy for greenlock.js for setting, retrieving,
and clearing ACME DNS-01 challenges issued by the ACME server
Prints out a subdomain record for `_acme-challenge` with `keyAuthDigest`
@ -31,14 +31,16 @@ npm install --save le-challenge-dns@2.x
Usage
-----
The challenge can be set globally like this:
```bash
var leChallengeDns = require('le-challenge-dns').create({
debug: false
});
var LE = require('letsencrypt');
var Greenlock = require('greenlock');
LE.create({
Greenlock.create({
server: LE.stagingServerUrl // Change to LE.productionServerUrl in production
, challengeType: 'dns-01'
, challenges: {
@ -48,6 +50,16 @@ LE.create({
});
```
In can also be set in the `approveDomains` callback instead, like this:
```
function approveDomains(opts, certs, cb) {
opts.challenges = { 'dns-01': leChallengeDns };
...
cb(null, { options: opts, certs: certs });
}
```
NOTE: If you request a certificate with 6 domains listed,
it will require 6 individual challenges.
@ -62,7 +74,7 @@ For ACME Challenge:
Note: `get()` is a no-op for `dns-01`.
For node-letsencrypt internals:
For greenlock.js internals:
* `getOptions()` returns the internal defaults merged with the user-supplied options
* `loopback(defaults, domain, challange, done)` performs a dns lookup of the txt record