caddy-dns / godaddy

MIT License
6 stars 4 forks source link

Unknown field "api_token" #6

Open excid3 opened 1 year ago

excid3 commented 1 year ago

I'm running Caddy 2.6.4 with the godaddy module and ran into this error.

{"error":"loading config: loading new config: loading http app module: provision http: getting tls app: loading tls app module: provision tls: provisioning automation policy 1: loading TLS automation management module: position 0: loading module 'acme': provision tls.issuance.acme: loading DNS provider module: loading module 'godaddy': decoding module config: dns.providers.godaddy: json: unknown field \"api_token\""}

I'm using the following JSON config for Caddy:

{
  "subjects": [
    "*.domain.com"
  ],
  "on_demand": false,
  "issuers": [
    {
      "challenges": {
        "dns": {
          "provider": {
            "name": "godaddy",
            "api_token": "abcedfgh"
          }
        }
      },
      "module": "acme"
    }
  ]
}

Any idea what I'm missing here? It seems api_token matches the docs correctly.

excid3 commented 1 year ago

Testing with caddy adapt on a Caddyfile, I found it output this:

{
    acme_dns godaddy 1234
}

example.com {
}
                  "dns": {
                    "provider": {
                      "APIToken": "1234",
                      "name": "godaddy"
                    }
                  }

This doesn't match the documentation in the README, so I'm assuming there's a bug in the module?