File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"time"
12
12
13
13
"golang.org/x/net/context"
14
+ "golang.org/x/net/context/ctxhttp"
14
15
"golang.org/x/oauth2"
15
16
jose "gopkg.in/square/go-jose.v2"
16
17
)
@@ -84,7 +85,7 @@ type providerJSON struct {
84
85
// or "https://login.salesforce.com".
85
86
func NewProvider (ctx context.Context , issuer string ) (* Provider , error ) {
86
87
wellKnown := strings .TrimSuffix (issuer , "/" ) + "/.well-known/openid-configuration"
87
- resp , err := clientFromContext (ctx ). Get ( wellKnown )
88
+ resp , err := ctxhttp . Get ( ctx , clientFromContext (ctx ), wellKnown )
88
89
if err != nil {
89
90
return nil , err
90
91
}
@@ -173,7 +174,7 @@ func (p *Provider) UserInfo(ctx context.Context, tokenSource oauth2.TokenSource)
173
174
}
174
175
token .SetAuthHeader (req )
175
176
176
- resp , err := clientFromContext (ctx ). Do ( req )
177
+ resp , err := ctxhttp . Do ( ctx , clientFromContext (ctx ), req )
177
178
if err != nil {
178
179
return nil , err
179
180
}
You can’t perform that action at this time.
0 commit comments