add http.Client with skipverify option to oauth renew token method, fix #2876

This commit is contained in:
Toni Moreno 2019-11-10 11:06:18 +01:00
parent e6ac2a53d4
commit af34ac8b18

View file

@ -163,6 +163,7 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
ClientSecret: config.Bitbucket.ClientSecret,
Endpoint: "https://bitbucket.org/site/oauth2/access_token",
Source: oauth2.ContextTokenSource(),
Client: defaultClient(config.Bitbucket.SkipVerify),
}
case config.Gitea.ClientID != "":
return &oauth2.Refresher{
@ -170,6 +171,7 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
ClientSecret: config.Gitea.ClientSecret,
Endpoint: config.Gitea.Server + "/login/oauth/access_token",
Source: oauth2.ContextTokenSource(),
Client: defaultClient(config.Gitea.SkipVerify),
}
}
return nil