Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Increase timeouts to 60s to allow auth over slow connections (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayzes authored and nickatsegment committed Dec 19, 2018
1 parent 8a61d94 commit 1d16eb7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const (

// deprecated; use OktaServerUs
OktaServer = OktaServerUs

Timeout = time.Duration(60 * time.Second)
)

type OktaClient struct {
Expand Down Expand Up @@ -436,8 +438,13 @@ func (o *OktaClient) Get(method string, path string, data []byte, recv interface
header = http.Header{}
}

transCfg := &http.Transport{
TLSHandshakeTimeout: Timeout,
}
client = http.Client{
Jar: o.CookieJar,
Transport: transCfg,
Timeout: Timeout,
Jar: o.CookieJar,
}

req := &http.Request{
Expand Down

0 comments on commit 1d16eb7

Please sign in to comment.