You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models/auth
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>
11 months ago
..
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
oauth2.go Pre-register OAuth2 applications for git credential helpers (#26291) 11 months ago
oauth2_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
session.go Implement FSFE REUSE for golang files (#21840) 2 years ago
source.go Fix 500 error if there is a name conflict when edit authentication source (#23832) 1 year ago
source_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
token.go Upgrade go dependencies (#25819) 12 months ago
token_scope.go Remove "misc" scope check from public API endpoints (#26134) 12 months ago
token_scope_test.go Redesign Scoped Access Tokens (#24767) 1 year ago
token_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
twofactor.go Use minio/sha256-simd for accelerated SHA256 (#23052) 1 year ago
webauthn.go Replace deprecated Webauthn library (#22400) 2 years ago
webauthn_test.go Replace deprecated Webauthn library (#22400) 2 years ago