diff --git a/oidc/config.go b/oidc/config.go index f782e81..4f24b37 100644 --- a/oidc/config.go +++ b/oidc/config.go @@ -288,7 +288,7 @@ func (c *Config) Validate() error { } } if c.ProviderCA != "" && c.RoundTripper != nil { - return fmt.Errorf("%s: you cannot specify both a ProviderCA and Transport: %w", op, ErrInvalidParameter) + return fmt.Errorf("%s: you cannot specify both a ProviderCA and RoundTripper: %w", op, ErrInvalidParameter) } if c.ProviderConfig != nil { diff --git a/oidc/provider.go b/oidc/provider.go index d03b2e7..f8b342e 100644 --- a/oidc/provider.go +++ b/oidc/provider.go @@ -639,7 +639,7 @@ func (p *Provider) HTTPClient() (*http.Client, error) { switch { case p.config.RoundTripper != nil && p.config.ProviderCA != "": - return nil, fmt.Errorf("%s: you cannot specify config for both a ProviderCA and Transport: %w", op, ErrInvalidParameter) + return nil, fmt.Errorf("%s: you cannot specify config for both a ProviderCA and RoundTripper: %w", op, ErrInvalidParameter) case p.config.ProviderCA != "": certPool := x509.NewCertPool() if ok := certPool.AppendCertsFromPEM([]byte(p.config.ProviderCA)); !ok { diff --git a/oidc/provider_test.go b/oidc/provider_test.go index 8dca1dd..b07b128 100644 --- a/oidc/provider_test.go +++ b/oidc/provider_test.go @@ -737,7 +737,7 @@ func TestHTTPClient(t *testing.T) { _, err := p.HTTPClient() require.Error(t, err) assert.ErrorIs(t, err, ErrInvalidParameter) - assert.ErrorContains(t, err, "you cannot specify config for both a ProviderCA and Transport") + assert.ErrorContains(t, err, "you cannot specify config for both a ProviderCA and RoundTripper") }) }