mirror of
https://github.com/go-acme/lego.git
synced 2024-12-23 09:15:11 +02:00
21 lines
425 B
Go
21 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)
|
|
}
|