Skip to content

Commit

Permalink
Fix DNSimple API Call. janeczku#93
Browse files Browse the repository at this point in the history
  • Loading branch information
jmatsushita committed Sep 18, 2017
1 parent 0913231 commit 7dbc196
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions letsencrypt/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ type ProviderOpts struct {
DoAccessToken string

// DNSimple credentials
DNSimpleEmail string
DNSimpleKey string
DNSimpleDomainAPIToken string

// Dyn credentials
DynCustomerName string
Expand Down Expand Up @@ -195,14 +194,11 @@ func makeRoute53Provider(opts ProviderOpts) (lego.ChallengeProvider, error) {

// returns a preconfigured DNSimple lego.ChallengeProvider
func makeDNSimpleProvider(opts ProviderOpts) (lego.ChallengeProvider, error) {
if len(opts.DNSimpleEmail) == 0 {
return nil, fmt.Errorf("DNSimple Email is not set")
}
if len(opts.DNSimpleKey) == 0 {
return nil, fmt.Errorf("DNSimple API key is not set")
if len(opts.DNSimpleDomainAPIToken) == 0 {
return nil, fmt.Errorf("DNSimple Domain API token is not set")
}

provider, err := dnsimple.NewDNSProviderCredentials(opts.DNSimpleEmail, opts.DNSimpleKey)
provider, err := dnsimple.NewDNSProviderCredentials(opts.DNSimpleDomainAPIToken, "https://api.dnsimple.com")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7dbc196

Please sign in to comment.