lego/providers/dns/stackpath/internal/identity.go

21 lines
425 B
Go
Raw Normal View History

2023-05-05 07:49:38 +00:00
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)
}