diff --git a/v3/api/client.go b/v3/api/client.go index 04d35de..3b4c389 100644 --- a/v3/api/client.go +++ b/v3/api/client.go @@ -31,7 +31,6 @@ import ( "strings" "time" - "github.com/Keyfactor/keyfactor-auth-client-go/auth_config" "github.com/Keyfactor/keyfactor-auth-client-go/auth_providers" "github.com/hashicorp/terraform-plugin-log/tflog" ) @@ -125,12 +124,12 @@ func initLogger(ctx *context.Context) { type AuthConfig interface { Authenticate() error GetHttpClient() (*http.Client, error) - GetServerConfig() *auth_config.Server + GetServerConfig() *auth_providers.Server } // NewKeyfactorClient creates a new Keyfactor client instance. A configured Client is returned with methods used to // interact with Keyfactor. -func NewKeyfactorClient(cfg *auth_config.Server, ctx *context.Context) (*Client, error) { +func NewKeyfactorClient(cfg *auth_providers.Server, ctx *context.Context) (*Client, error) { initLogger(ctx) client := Client{} clientAuthType := cfg.GetAuthType() @@ -269,7 +268,7 @@ func (c *Client) sendRequest(request *request) (*http.Response, error) { if apiPath == "" { apiPath = DefaultAPIPath } - endpoint := fmt.Sprintf("%s", strings.Trim(apiPath, "/")) + request.Endpoint + endpoint := fmt.Sprintf("%s/", strings.Trim(apiPath, "/")) + request.Endpoint log.Printf("[DEBUG] Endpoint: %s", endpoint) u.Path = path.Join(u.Path, endpoint) // Attach enroll endpoint log.Printf("[DEBUG] URL: %s", u.String()) diff --git a/v3/go.mod b/v3/go.mod index 01852be..fcd5f3d 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -19,7 +19,7 @@ go 1.23 toolchain go1.23.2 require ( - github.com/Keyfactor/keyfactor-auth-client-go v0.0.1-rc.14 + github.com/Keyfactor/keyfactor-auth-client-go v0.0.1-rc.17 github.com/Keyfactor/keyfactor-go-client v1.4.3 github.com/Keyfactor/keyfactor-go-client-sdk v1.1.0-rc.7 github.com/hashicorp/terraform-plugin-log v0.9.0 diff --git a/v3/go.sum b/v3/go.sum index 83c2375..709f3de 100644 --- a/v3/go.sum +++ b/v3/go.sum @@ -1,5 +1,6 @@ github.com/Keyfactor/keyfactor-auth-client-go v0.0.1-rc.14 h1:QLnYYZvzDonDamUkHfU0cQWZEr893zCf1vxbF9MSnUg= github.com/Keyfactor/keyfactor-auth-client-go v0.0.1-rc.14/go.mod h1:UTPLARTONwfc+j1y2SjEa54gbFFCObQucHf3ubQVyDk= +github.com/Keyfactor/keyfactor-auth-client-go v0.0.1-rc.17/go.mod h1:UTPLARTONwfc+j1y2SjEa54gbFFCObQucHf3ubQVyDk= github.com/Keyfactor/keyfactor-go-client v1.4.3 h1:CmGvWcuIbDRFM0PfYOQH6UdtAgplvZBpU++KTU8iseg= github.com/Keyfactor/keyfactor-go-client v1.4.3/go.mod h1:3ZymLNCaSazglcuYeNfm9nrzn22wcwLjIWURrnUygBo= github.com/Keyfactor/keyfactor-go-client-sdk v1.0.1 h1:cs8hhvsY3MJ2o1K11HLTRCjRT8SbsKhhi73Y4By2CI0=