forgejo/docs/content/doc/developers
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>
2022-10-24 15:59:24 +08:00
..
api-usage.en-us.md Remove insecure flag from curl (#21074) 2022-09-05 14:22:44 +01:00
api-usage.zh-cn.md Update curl usage in API docs (#21071) 2022-09-05 03:22:03 -04:00
guidelines-backend.md Fix some typos and update db transaction demo in backend guideline (#21322) 2022-10-08 02:12:19 +08:00
guidelines-frontend.en-us.md Fix broken link to frontend guidelines in hacking guidelines (#21382) 2022-10-11 21:23:21 -04:00
hacking-on-gitea.en-us.md inline gitpod image (#21494) 2022-10-18 09:55:57 +08:00
integrations.en-us.md Pre-fill suggested New File 'name' and 'content' with Query Params (#16556) 2021-07-29 05:39:46 +02:00
integrations.zh-tw.md docs: Fix broken anchors in links to awesome-gitea (#16331) 2021-07-03 21:42:33 +01:00
migrations.en-us.md Add markdownlint (#20512) 2022-07-28 09:22:47 +08:00
migrations.zh-tw.md Add markdownlint (#20512) 2022-07-28 09:22:47 +08:00
oauth2-provider.md Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
oauth2-provider.zh-tw.md Use neutral language in comments and docs (#20135) 2022-06-25 17:50:12 -05:00