File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -288,12 +288,19 @@ func (c *CommandAuthConfig) ValidateAuthConfig() error {
288288
289289// BuildTransport creates a custom http Transport for authentication to Keyfactor Command API.
290290func (c * CommandAuthConfig ) BuildTransport () (* http.Transport , error ) {
291+ defaultTimeout := time .Duration (c .HttpClientTimeout ) * time .Second
291292 output := http.Transport {
292293 Proxy : http .ProxyFromEnvironment ,
293294 TLSClientConfig : & tls.Config {
294295 Renegotiation : tls .RenegotiateOnceAsClient ,
295296 },
296- TLSHandshakeTimeout : 10 * time .Second ,
297+ TLSHandshakeTimeout : defaultTimeout ,
298+ ResponseHeaderTimeout : defaultTimeout ,
299+ IdleConnTimeout : defaultTimeout ,
300+ ExpectContinueTimeout : defaultTimeout ,
301+ MaxIdleConns : 10 ,
302+ MaxIdleConnsPerHost : 10 ,
303+ MaxConnsPerHost : 10 ,
297304 }
298305
299306 if c .SkipVerify {
Original file line number Diff line number Diff line change @@ -17,6 +17,6 @@ module github.com/Keyfactor/keyfactor-auth-client-go
1717go 1.22
1818
1919require (
20- golang.org/x/oauth2 v0.23 .0
20+ golang.org/x/oauth2 v0.24 .0
2121 gopkg.in/yaml.v2 v2.4.0
2222)
Original file line number Diff line number Diff line change 11github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38 =
22github.com/google/go-cmp v0.5.9 /go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY =
3- golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA =
4- golang.org/x/oauth2 v0.22.0 /go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI =
5- golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs =
6- golang.org/x/oauth2 v0.23.0 /go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI =
3+ golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE =
4+ golang.org/x/oauth2 v0.24.0 /go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI =
75gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
86gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
97gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY =
You can’t perform that action at this time.
0 commit comments