0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-29 08:24:32 +01:00
gitea/modules
Denys Konovalov 63ab92d797
Pre-register OAuth2 applications for git credential helpers (#26291)
This PR is an extended implementation of #25189 and builds upon the
proposal by @hickford in #25653, utilizing some ideas proposed
internally by @wxiaoguang.

Mainly, this PR consists of a mechanism to pre-register OAuth2
applications on startup, which can be enabled or disabled by modifying
the `[oauth2].DEFAULT_APPLICATIONS` parameter in app.ini. The OAuth2
applications registered this way are being marked as "locked" and
neither be deleted nor edited over UI to prevent confusing/unexpected
behavior. Instead, they're being removed if no longer enabled in config.


![grafik](https://github.com/go-gitea/gitea/assets/47871822/81a78b1c-4b68-40a7-9e99-c272ebb8f62e)

The implemented mechanism can also be used to pre-register other OAuth2
applications in the future, if wanted.

Co-authored-by: hickford <mirth.hickford@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

---------

Co-authored-by: M Hickford <mirth.hickford@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-08-09 14:24:07 +02:00
..
actions Fix the bug when getting files changed for pull_request_target event (#26320) 2023-08-05 14:26:06 +08:00
activitypub
analyze Rename code_langauge.go to code_language.go (#26377) 2023-08-07 15:00:53 -04:00
assetfs
auth
avatar
base
cache improve unit test for caching (#26185) 2023-07-27 22:24:40 +02:00
charset
container
context Introduce ctx.PathParamRaw to avoid incorrect unescaping (#26392) 2023-08-09 14:57:45 +08:00
csv
doctor
emoji
eventsource
generate
git Make git batch operations use parent context timeout instead of default timeout (#26325) 2023-08-04 14:50:41 +02:00
gitgraph
graceful Allow the use of alternative net.Listener implementations by downstreams (#25855) 2023-07-24 07:18:17 +00:00
hcaptcha
highlight
hostmatcher
html Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
httpcache
httplib
indexer Refactor and enhance issue indexer to support both searching, filtering and paging (#26012) 2023-07-31 06:28:53 +00:00
issue/template
json
label
lfs
log
markup Make user-content-* consistent with github (#26388) 2023-08-09 09:30:31 +00:00
mcaptcha
metrics
migration
mirror
nosql
notification Refactor and enhance issue indexer to support both searching, filtering and paging (#26012) 2023-07-31 06:28:53 +00:00
options
packages Prevent newline errors with Debian packages (#26332) 2023-08-05 10:59:52 +02:00
paginator
pprof
private
process
proxy
proxyprotocol
public
queue Calculate MAX_WORKERS default value by CPU number (#26177) 2023-07-27 16:40:35 +08:00
recaptcha
references
regexplru
repository Refactor and enhance issue indexer to support both searching, filtering and paging (#26012) 2023-07-31 06:28:53 +00:00
secret
session
setting Pre-register OAuth2 applications for git credential helpers (#26291) 2023-08-09 14:24:07 +02:00
sitemap
ssh
storage
structs Doc update swagger doc for POST /orgs/{org}/teams (#26155) 2023-07-26 10:22:56 +00:00
svg Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
sync
system
templates Refactor "editorconfig" (#26391) 2023-08-08 10:44:19 +00:00
test Start using template context function (#26254) 2023-08-08 01:22:47 +00:00
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util
validation
web Fix incorrect router logger (#26137) 2023-07-25 22:21:09 +00:00
webhook