lego/providers/dns/stackpath/internal/identity.go
2023-05-05 09:49:38 +02:00

20 lines
425 B
Go

package internal
import (
"context"
"net/http"
"golang.org/x/oauth2/clientcredentials"
)
const defaultAuthURL = "https://gateway.stackpath.com/identity/v1/oauth2/token"
func createOAuthClient(ctx context.Context, clientID, clientSecret string) *http.Client {
config := &clientcredentials.Config{
TokenURL: defaultAuthURL,
ClientID: clientID,
ClientSecret: clientSecret,
}
return config.Client(ctx)
}