update to use Tokener func
This commit is contained in:
parent
e8f2e8205e
commit
d66053efd1
|
@ -91,7 +91,9 @@ func main() {
|
||||||
// newAPIDNSProvider is for the sake of demoing the tunnel
|
// newAPIDNSProvider is for the sake of demoing the tunnel
|
||||||
func newAPIDNSProvider(baseURL string, token string) (*dns01.DNSProvider, error) {
|
func newAPIDNSProvider(baseURL string, token string) (*dns01.DNSProvider, error) {
|
||||||
config := dns01.NewDefaultConfig()
|
config := dns01.NewDefaultConfig()
|
||||||
config.Token = token
|
config.Tokener = func() string {
|
||||||
|
return token
|
||||||
|
}
|
||||||
endpoint, err := url.Parse(baseURL)
|
endpoint, err := url.Parse(baseURL)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -310,7 +310,9 @@ func newGoDaddyDNSProvider(id, secret string) (*godaddy.DNSProvider, error) {
|
||||||
// newAPIDNSProvider is for the sake of demoing the tunnel
|
// newAPIDNSProvider is for the sake of demoing the tunnel
|
||||||
func newAPIDNSProvider(baseURL string, token string) (*tbDns01.DNSProvider, error) {
|
func newAPIDNSProvider(baseURL string, token string) (*tbDns01.DNSProvider, error) {
|
||||||
config := tbDns01.NewDefaultConfig()
|
config := tbDns01.NewDefaultConfig()
|
||||||
config.Token = token
|
config.Tokener = func() string {
|
||||||
|
return token
|
||||||
|
}
|
||||||
endpoint, err := url.Parse(baseURL)
|
endpoint, err := url.Parse(baseURL)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue