Commit 83f1ae4e by Matt Bostock

OAuth: Rename sslcli

Rename `sslcli` to the more descriptive `oauthClient`.
parent ccf093da
...@@ -83,7 +83,7 @@ func OAuthLogin(ctx *middleware.Context) { ...@@ -83,7 +83,7 @@ func OAuthLogin(ctx *middleware.Context) {
InsecureSkipVerify: setting.OAuthService.OAuthInfos[name].TlsSkipVerify, InsecureSkipVerify: setting.OAuthService.OAuthInfos[name].TlsSkipVerify,
}, },
} }
sslcli := &http.Client{ oauthClient := &http.Client{
Transport: tr, Transport: tr,
} }
...@@ -107,7 +107,7 @@ func OAuthLogin(ctx *middleware.Context) { ...@@ -107,7 +107,7 @@ func OAuthLogin(ctx *middleware.Context) {
tr.TLSClientConfig.RootCAs = caCertPool tr.TLSClientConfig.RootCAs = caCertPool
} }
oauthCtx := context.WithValue(context.Background(), oauth2.HTTPClient, sslcli) oauthCtx := context.WithValue(context.Background(), oauth2.HTTPClient, oauthClient)
// get token from provider // get token from provider
token, err := connect.Exchange(oauthCtx, code) token, err := connect.Exchange(oauthCtx, code)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment