update docs
This commit is contained in:
		
							parent
							
								
									8311d9275c
								
							
						
					
					
						commit
						09d69c521f
					
				
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
								
							@ -8,7 +8,7 @@ le-challenge-dns
 | 
				
			|||||||
| [acme-v2.js](https://git.coolaj86.com/coolaj86/acme-v2.js)
 | 
					| [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
 | 
					and clearing ACME DNS-01 challenges issued by the ACME server
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Prints out a subdomain record for `_acme-challenge` with `keyAuthDigest`
 | 
					Prints out a subdomain record for `_acme-challenge` with `keyAuthDigest`
 | 
				
			||||||
@ -31,14 +31,16 @@ npm install --save le-challenge-dns@2.x
 | 
				
			|||||||
Usage
 | 
					Usage
 | 
				
			||||||
-----
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The challenge can be set globally like this:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
var leChallengeDns = require('le-challenge-dns').create({
 | 
					var leChallengeDns = require('le-challenge-dns').create({
 | 
				
			||||||
  debug: false
 | 
					  debug: false
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var LE = require('letsencrypt');
 | 
					var Greenlock = require('greenlock');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LE.create({
 | 
					Greenlock.create({
 | 
				
			||||||
  server: LE.stagingServerUrl                               // Change to LE.productionServerUrl in production
 | 
					  server: LE.stagingServerUrl                               // Change to LE.productionServerUrl in production
 | 
				
			||||||
, challengeType: 'dns-01'
 | 
					, challengeType: 'dns-01'
 | 
				
			||||||
, challenges: {
 | 
					, 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,
 | 
					NOTE: If you request a certificate with 6 domains listed,
 | 
				
			||||||
it will require 6 individual challenges.
 | 
					it will require 6 individual challenges.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -62,7 +74,7 @@ For ACME Challenge:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Note: `get()` is a no-op for `dns-01`.
 | 
					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
 | 
					* `getOptions()` returns the internal defaults merged with the user-supplied options
 | 
				
			||||||
* `loopback(defaults, domain, challange, done)` performs a dns lookup of the txt record
 | 
					* `loopback(defaults, domain, challange, done)` performs a dns lookup of the txt record
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user