AcmeClient
Kind: global class
- AcmeClient
- new AcmeClient(opts)
- .getTermsOfServiceUrl() ⇒
Promise.<string>
- .createAccount([data]) ⇒
Promise.<object>
- .updateAccount([data]) ⇒
Promise.<object>
- .updateAccountKey(newAccountKey, [data]) ⇒
Promise.<object>
- .createOrder(data) ⇒
Promise.<object>
- .finalizeOrder(order, csr) ⇒
Promise.<object>
- .getAuthorizations(order) ⇒
Promise.<Array.<object>>
- .deactivateAuthorization(authz) ⇒
Promise.<object>
- .getChallengeKeyAuthorization(challenge) ⇒
Promise.<string>
- .verifyChallenge(authz, challenge) ⇒
Promise
- .completeChallenge(challenge) ⇒
Promise.<object>
- .waitForValidStatus(item) ⇒
Promise.<object>
- .getCertificate(order) ⇒
Promise.<buffer>
- .revokeCertificate(cert, [data]) ⇒
Promise
- .auto(opts) ⇒
Promise.<buffer>
Param | Type | Description |
---|---|---|
opts | object |
|
opts.directoryUrl | string |
ACME directory URL |
opts.accountKey | buffer | string |
PEM encoded account private key |
[opts.backoffAttempts] | number |
Maximum number of backoff attempts, default: 5 |
[opts.backoffMin] | number |
Minimum backoff attempt delay in milliseconds, default: 5000 |
[opts.backoffMax] | number |
Maximum backoff attempt delay in milliseconds, default: 30000 |
Get Terms of Service URL
Kind: instance method of AcmeClient
Returns: Promise.<string>
- ToS URL
Create a new account
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#account-creation
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Account
Param | Type | Description |
---|---|---|
[data] | object |
Request data |
Update existing account
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#account-update
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Account
Param | Type | Description |
---|---|---|
[data] | object |
Request data |
Update account private key
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#account-key-roll-over
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Account
Param | Type | Description |
---|---|---|
newAccountKey | buffer | string |
New PEM encoded private key |
[data] | object |
Additional request data |
Create a new order
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Order
Param | Type | Description |
---|---|---|
data | object |
Request data |
Finalize order
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Order
Param | Type | Description |
---|---|---|
order | object |
Order object |
csr | buffer | string |
PEM encoded Certificate Signing Request |
Get identifier authorizations from order
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#identifier-authorization
Kind: instance method of AcmeClient
Returns: Promise.<Array.<object>>
- Authorizations
Param | Type | Description |
---|---|---|
order | object |
Order |
Deactivate identifier authorization
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Authorization
Param | Type | Description |
---|---|---|
authz | object |
Identifier authorization |
Get key authorization for ACME challenge
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#key-authorizations
Kind: instance method of AcmeClient
Returns: Promise.<string>
- Key authorization
Param | Type | Description |
---|---|---|
challenge | object |
Challenge object returned by API |
Verify that ACME challenge is satisfied
Kind: instance method of AcmeClient
Param | Type | Description |
---|---|---|
authz | object |
Identifier authorization |
challenge | object |
Authorization challenge |
Notify provider that challenge has been completed
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#responding-to-challenges
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Challenge
Param | Type | Description |
---|---|---|
challenge | object |
Challenge object returned by API |
Wait for ACME provider to verify status on a order, authorization or challenge
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#responding-to-challenges
Kind: instance method of AcmeClient
Returns: Promise.<object>
- Valid order, authorization or challenge
Param | Type | Description |
---|---|---|
item | object |
An order, authorization or challenge object |
Get certificate from ACME order
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#downloading-the-certificate
Kind: instance method of AcmeClient
Returns: Promise.<buffer>
- Certificate
Param | Type | Description |
---|---|---|
order | object |
Order object |
Revoke certificate
https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md#certificate-revocation
Kind: instance method of AcmeClient
Param | Type | Description |
---|---|---|
cert | buffer | string |
PEM encoded certificate |
[data] | object |
Additional request data |
Auto mode
Kind: instance method of AcmeClient
Returns: Promise.<buffer>
- Certificate
Param | Type | Description |
---|---|---|
opts | object |
|
opts.csr | buffer | string |
Certificate Signing Request |
opts.challengeCreateFn | function |
Function returning Promise triggered before completing ACME challenge |
opts.challengeRemoveFn | function |
Function returning Promise triggered after completing ACME challenge |
[opts.email] | string |
Account email address |
[opts.termsOfServiceAgreed] | boolean |
Agree to Terms of Service, default: false |
[opts.challengePriority] | Array.<string> |
Array defining challenge type priority, default: ['http-01', 'dns-01'] |