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.
gitea/modules
M Hickford 191a74d622
Record OAuth client type at registration (#21316)
The OAuth spec [defines two types of
client](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1),
confidential and public. Previously Gitea assumed all clients to be
confidential.

> OAuth defines two client types, based on their ability to authenticate
securely with the authorization server (i.e., ability to
>   maintain the confidentiality of their client credentials):
>
>   confidential
> Clients capable of maintaining the confidentiality of their
credentials (e.g., client implemented on a secure server with
> restricted access to the client credentials), or capable of secure
client authentication using other means.
>
>   **public
> Clients incapable of maintaining the confidentiality of their
credentials (e.g., clients executing on the device used by the resource
owner, such as an installed native application or a web browser-based
application), and incapable of secure client authentication via any
other means.**
>
> The client type designation is based on the authorization server's
definition of secure authentication and its acceptable exposure levels
of client credentials. The authorization server SHOULD NOT make
assumptions about the client type.

 https://datatracker.ietf.org/doc/html/rfc8252#section-8.4

> Authorization servers MUST record the client type in the client
registration details in order to identify and process requests
accordingly.

Require PKCE for public clients:
https://datatracker.ietf.org/doc/html/rfc8252#section-8.1

> Authorization servers SHOULD reject authorization requests from native
apps that don't use PKCE by returning an error message

Fixes #21299

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
activitypub Refactor AssertExistsAndLoadBean to use generics (#20797) 2 years ago
analyze Simplify `IsVendor` (#19626) 3 years ago
auth Remove legacy `+build:` constraint (#19582) 3 years ago
avatar Go 1.19 format (#20758) 2 years ago
base Add generic set type (#21408) 2 years ago
cache Update go-chi/cache to utilize Ping() (#19719) 3 years ago
charset Move go-licenses to generate and separate generate into a frontend and backend component (#21061) 2 years ago
container Add generic set type (#21408) 2 years ago
context Redirect to new repository owner (#21398) 2 years ago
convert Record OAuth client type at registration (#21316) 2 years ago
csv Go 1.19 format (#20758) 2 years ago
doctor Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
emoji Go 1.19 format (#20758) 2 years ago
eventsource Move some files into models' sub packages (#20262) 2 years ago
generate Use base32 for 2FA scratch token (#18384) 3 years ago
git Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
gitgraph Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
graceful Support Proxy protocol (#12527) 2 years ago
hcaptcha hCaptcha Support (#12594) 4 years ago
highlight Upgrade chroma to v2.3.0 (#21259) 2 years ago
hostmatcher Add proxy host into allow list (#20798) 2 years ago
httpcache Add Cache-Control header to html and api responses, add no-transform (#20432) 3 years ago
httplib refactor httplib (#18338) 3 years ago
indexer Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
issue/template Add generic set type (#21408) 2 years ago
json Refactor legacy `unknwon/com` package, improve golangci lint (#19284) 3 years ago
lfs Removed some vestigial code related to Range bounds checks (#20312) 3 years ago
log test: use `T.TempDir` to create temporary test directory (#21043) 2 years ago
markup Add link to user profile in markdown mention only if user exists (#21533) 2 years ago
mcaptcha Add support mCaptcha as captcha provider (#20458) 3 years ago
metrics Move some files into models' sub packages (#20262) 2 years ago
migration Add more checks in migration code (#21011) 2 years ago
mirror Implement sync push mirror on commit (#19411) 3 years ago
nosql fix broken insecureskipverify handling in rediss connection uris (#20967) 2 years ago
notification Decouple HookTask from Repository (#17940) 2 years ago
options Fix and improve incorrect error messages (#21342) 2 years ago
packages Add support for Chocolatey/NuGet v2 API (#21393) 2 years ago
paginator Remove unnecessary misspell ignore pattern (#21475) 2 years ago
password Fixed assert statements. (#16089) 4 years ago
pprof Go 1.19 format (#20758) 2 years ago
private log real ip of requests from ssh (#21216) 2 years ago
process Add more linters to improve code readability (#19989) 3 years ago
proxy Return nil proxy function if proxy not enabled (#16742) 4 years ago
proxyprotocol Support Proxy protocol (#12527) 2 years ago
public Add generic set type (#21408) 2 years ago
queue Add generic set type (#21408) 2 years ago
recaptcha refactor: move from io/ioutil to io and os package (#17109) 3 years ago
references Remove unnecessary misspell ignore pattern (#21475) 2 years ago
regexplru Custom regexp external issues (#17624) 3 years ago
repository Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
secret Use `CryptoRandomBytes` instead of `CryptoRandomString` (#18439) 3 years ago
session format with gofumpt (#18184) 3 years ago
setting Add system setting table with cache and also add cache supports for user setting (#18058) 2 years ago
sitemap Add sitemap support (#18407) 3 years ago
ssh Support Proxy protocol (#12527) 2 years ago
storage Save files in local storage as umask (#21198) 2 years ago
structs Record OAuth client type at registration (#21316) 2 years ago
svg Remove legacy `+build:` constraint (#19582) 3 years ago
sync Add generic set type (#21408) 2 years ago
system Add system setting table with cache and also add cache supports for user setting (#18058) 2 years ago
templates Fix generating compare link (#21519) 2 years ago
test Refactor AssertExistsAndLoadBean to use generics (#20797) 2 years ago
timeutil Share HTML template renderers and create a watcher framework (#20218) 2 years ago
translation Make every not exist error unwrappable to a fs.ErrNotExist (#20891) 2 years ago
typesniffer Rework raw file http header logic (#20484) 3 years ago
updatechecker Add system setting table with cache and also add cache supports for user setting (#18058) 2 years ago
upload Simplify parameter types (#18006) 3 years ago
uri Prevent NPE if gitea uploader fails to open url (#18080) 3 years ago
user Add gitea-vet (#10948) 5 years ago
util Make every not exist error unwrappable to a fs.ErrNotExist (#20891) 2 years ago
validation Add more checks in migration code (#21011) 2 years ago
watcher Share HTML template renderers and create a watcher framework (#20218) 2 years ago
web refactor webhook *NewPost (#20729) 3 years ago