forgejo/routers/api/v1
Paweł Bogusławski d4e281bc02
Allow Token API calls be authorized using the reverse-proxy header (#15119)
* API calls authorized with HTTP header

This mod allows API calls to be authorized with HTTP header
when ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled. Without
it user authenticated by reverse proxy is able to access
gitea UI but not API which is inconsistent.

Author-Change-Id: IB#1107572

* Fixed API calls authorized with HTTP header

Only reqBasicAuth is modified to allow reverse proxy
auth as alternative and reqToken is left untouched.

Fixes: dc952c0632
Author-Change-Id: IB#1107572

* Reverse proxy API auth separated in docs

Related: https://github.com/go-gitea/gitea/pull/15119#discussion_r621322127
Author-Change-Id: IB#1107572

* Reverse proxy API auth separated in docs

Related: https://github.com/go-gitea/gitea/pull/15119#discussion_r621322127
Author-Change-Id: IB#1107572

* Reverse proxy API auth separated

Related: https://github.com/go-gitea/gitea/pull/15119#discussion_r621322127
Author-Change-Id: IB#1107572

* ReverseProxyAuth removed from swagger

ReverseProxyAuth removed from swagger as in upstream's suggestion.

Related: https://github.com/go-gitea/gitea/pull/15119#pullrequestreview-692180940
Author-Change-Id: IB#1107572

* ReverseProxyAuth API authorization fixed

Related: https://github.com/go-gitea/gitea/pull/15119#issuecomment-868465099
Author-Change-Id: IB#1107572

* ReverseProxyAuth API authorization fixed

Related: https://github.com/go-gitea/gitea/pull/15119#issuecomment-868465099
Author-Change-Id: IB#1107572
2021-11-19 22:54:44 +08:00
..
admin Use a standalone struct name for Organization (#17632) 2021-11-19 19:41:40 +08:00
misc Add nodeinfo endpoint for federation purposes (#16953) 2021-09-28 01:38:06 +02:00
notify Fix 500 when a comment was deleted which has a notification (#17550) 2021-11-10 13:48:45 +08:00
org Use a standalone struct name for Organization (#17632) 2021-11-19 19:41:40 +08:00
repo Move attachment into models/repo/ (#17650) 2021-11-19 21:39:57 +08:00
settings Make mirror feature more configurable (#16957) 2021-09-07 17:49:36 +02:00
swagger Add API to get/edit wiki (#17278) 2021-10-25 11:43:40 +08:00
user Use a standalone struct name for Organization (#17632) 2021-11-19 19:41:40 +08:00
utils Use a standalone struct name for Organization (#17632) 2021-11-19 19:41:40 +08:00
api.go Allow Token API calls be authorized using the reverse-proxy header (#15119) 2021-11-19 22:54:44 +08:00