diff --git a/CHANGELOG.md b/CHANGELOG.md index b80a96d2..76fe2a47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased +### Removed +- Support for basic auth as an option for Gitea, by [@techknowlogick](https://giteahub.com/techknowlogick). [#2721](https://github.com/drone/drone/issues/2721) + ## [1.3.1] - 2019-08-26 ### Added - - support for the GitHub deployment status API, by [@bradrydzewski](https://github.com/bradrydzewski). ## [1.3.0] - 2019-08-20 diff --git a/cmd/drone-server/inject_client.go b/cmd/drone-server/inject_client.go index b3113556..7b0c955e 100644 --- a/cmd/drone-server/inject_client.go +++ b/cmd/drone-server/inject_client.go @@ -117,16 +117,6 @@ func provideGiteaClient(config config.Config) *scm.Client { if config.Gitea.Debug { client.DumpResponse = httputil.DumpResponse } - if config.Gitea.ClientID == "" { - client.Client = &http.Client{ - Transport: &oauth2.Transport{ - Scheme: oauth2.SchemeToken, - Source: oauth2.ContextTokenSource(), - Base: defaultTransport(config.Gitea.SkipVerify), - }, - } - return client - } client.Client = &http.Client{ Transport: &oauth2.Transport{ Scheme: oauth2.SchemeBearer, diff --git a/cmd/drone-server/inject_login.go b/cmd/drone-server/inject_login.go index caadae39..691a8ac8 100644 --- a/cmd/drone-server/inject_login.go +++ b/cmd/drone-server/inject_login.go @@ -92,22 +92,14 @@ func provideGiteaLogin(config config.Config) login.Middleware { if config.Gitea.Server == "" { return nil } - if config.Gitea.ClientID != "" { - return &gitea.Config { - ClientID: config.Gitea.ClientID, - ClientSecret: config.Gitea.ClientSecret, - Server: config.Gitea.Server, - Client: defaultClient(config.Gitea.SkipVerify), - Logger: logrus.StandardLogger(), - RedirectURL: config.Server.Addr + "/login", - Scope: config.Gitea.Scope, - } - } - return &gogs.Config{ - Label: "drone", - Login: "/login/form", - Server: config.Gitea.Server, - Client: defaultClient(config.Gitea.SkipVerify), + return &gitea.Config { + ClientID: config.Gitea.ClientID, + ClientSecret: config.Gitea.ClientSecret, + Server: config.Gitea.Server, + Client: defaultClient(config.Gitea.SkipVerify), + Logger: logrus.StandardLogger(), + RedirectURL: config.Server.Addr + "/login", + Scope: config.Gitea.Scope, } }