add http.Client with skipverify option to oauth renew token method, fix #2876
This commit is contained in:
parent
e6ac2a53d4
commit
af34ac8b18
1 changed files with 2 additions and 0 deletions
|
@ -163,6 +163,7 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
|
||||||
ClientSecret: config.Bitbucket.ClientSecret,
|
ClientSecret: config.Bitbucket.ClientSecret,
|
||||||
Endpoint: "https://bitbucket.org/site/oauth2/access_token",
|
Endpoint: "https://bitbucket.org/site/oauth2/access_token",
|
||||||
Source: oauth2.ContextTokenSource(),
|
Source: oauth2.ContextTokenSource(),
|
||||||
|
Client: defaultClient(config.Bitbucket.SkipVerify),
|
||||||
}
|
}
|
||||||
case config.Gitea.ClientID != "":
|
case config.Gitea.ClientID != "":
|
||||||
return &oauth2.Refresher{
|
return &oauth2.Refresher{
|
||||||
|
@ -170,6 +171,7 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
|
||||||
ClientSecret: config.Gitea.ClientSecret,
|
ClientSecret: config.Gitea.ClientSecret,
|
||||||
Endpoint: config.Gitea.Server + "/login/oauth/access_token",
|
Endpoint: config.Gitea.Server + "/login/oauth/access_token",
|
||||||
Source: oauth2.ContextTokenSource(),
|
Source: oauth2.ContextTokenSource(),
|
||||||
|
Client: defaultClient(config.Gitea.SkipVerify),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue