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/modules/structs
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.go User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133) 2 years ago
admin_user.go Respect DefaultUserIsRestricted system default when creating new user (#19310) 2 years ago
attachment.go Fix wrong hint when status checking is running on pull request view (#9886) 4 years ago
commit_status.go [Refactor] CombinedStatus and CommitStatus related functions & structs (#14026) 4 years ago
cron.go Add cron running API (#12421) 4 years ago
doc.go Move sdk structs to modules/structs (#6905) 5 years ago
fork.go - name: new parameter in CreateForkOption to give the forked repository (#18066) 3 years ago
git_blob.go Move sdk structs to modules/structs (#6905) 5 years ago
git_hook.go Move sdk structs to modules/structs (#6905) 5 years ago
hook.go Display total commit count in hook message (#21400) 2 years ago
issue.go Support Issue forms and PR forms (#20987) 2 years ago
issue_comment.go Add API to get issue/pull comments and events (timeline) (#17403) 3 years ago
issue_label.go [API] Fix inconsistent label color format (#10129) 4 years ago
issue_milestone.go Add Created & Updated to Milestone (#12662) 4 years ago
issue_reaction.go [API] Fix 9544 | return 200 when reaction already exist (#9550) 5 years ago
issue_stopwatch.go Display current stopwatch in navbar (#14122) 3 years ago
issue_tracked_time.go [API] Extend times API (#9200) 5 years ago
lfs_lock.go Move sdk structs to modules/structs (#6905) 5 years ago
mirror.go Add new API endpoints for push mirrors management (#19841) 2 years ago
miscellaneous.go API method to list all commits of a repository (#6408) 5 years ago
nodeinfo.go Add nodeinfo endpoint for federation purposes (#16953) 3 years ago
notifications.go API: add html urls to notification subjects (#17178) 3 years ago
org.go Add name field for org api (#21270) 2 years ago
org_member.go Move sdk structs to modules/structs (#6905) 5 years ago
org_team.go Fix typo in API comment document (#21347) 2 years ago
org_type.go Add more linters to improve code readability (#19989) 2 years ago
package.go Add Package Registry (#16510) 2 years ago
pull.go Add API endpoint to get changed files of a PR (#21177) 2 years ago
pull_review.go Dismiss prior pull reviews if done via web in review dismiss (#20197) 2 years ago
release.go Add single release page and latest redirect (#11102) 4 years ago
repo.go Make external issue tracker regexp configurable via API (#21338) 2 years ago
repo_branch.go Support unprotected file patterns (#16395) 3 years ago
repo_collaborator.go Add API to query collaborators permission for a repository (#18761) 2 years ago
repo_commit.go More commit info from API (#19252) 2 years ago
repo_file.go Add latest commit's SHA to content response (#20398) 2 years ago
repo_key.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_note.go Add an api endpoint to fetch git notes (#15373) (#16649) 3 years ago
repo_refs.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_tag.go [API] Add repoCreateTag (#16165) 3 years ago
repo_topic.go Add API endpoint for accessing repo topics (#7963) 5 years ago
repo_tree.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_watch.go Move sdk structs to modules/structs (#6905) 5 years ago
repo_wiki.go Add API to get/edit wiki (#17278) 3 years ago
settings.go Add custom emoji support (#16004) 3 years ago
status.go [Refactor] CombinedStatus and CommitStatus related functions & structs (#14026) 4 years ago
task.go Move migrating repository from frontend to backend (#6200) 5 years ago
user.go Include login_name in adminCreateUser response (#20283) 2 years ago
user_app.go Record OAuth client type at registration (#21316) 2 years ago
user_email.go Move sdk structs to modules/structs (#6905) 5 years ago
user_gpgkey.go Add option to provide signature for a token to verify key ownership (#14054) 3 years ago
user_key.go Move sdk structs to modules/structs (#6905) 5 years ago