summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorJohnny Oskarsson <johnny@joskar.se>2021-01-01 17:33:27 +0100
committerGitHub <noreply@github.com>2021-01-02 00:33:27 +0800
commita07e67d9cc39506c149cfadcf0d6f2ab234cf7f6 (patch)
treee4724060cbd74a2374be9bab8c4f13773ee3b270 /docs/content
parent4f2f08bd804a6b900e9e7e7bd7f6e7f073581966 (diff)
downloadgitea-a07e67d9cc39506c149cfadcf0d6f2ab234cf7f6.tar.gz
gitea-a07e67d9cc39506c149cfadcf0d6f2ab234cf7f6.zip
Minimal OpenID Connect implementation (#14139)
This is "minimal" in the sense that only the Authorization Code Flow from OpenID Connect Core is implemented. No discovery, no configuration endpoint, and no user scope management. OpenID Connect is an extension to the (already implemented) OAuth 2.0 protocol, and essentially an `id_token` JWT is added to the access token endpoint response when using the Authorization Code Flow. I also added support for the "nonce" field since it is required to be used in the id_token if the client decides to include it in its initial request. In order to enable this extension an OAuth 2.0 scope containing "openid" is needed. Other OAuth 2.0 requests should not be impacted by this change. This minimal implementation is enough to enable single sign-on (SSO) for other sites, e.g. by using something like `mod_auth_openidc` to only allow access to a CI server if a user has logged into Gitea. Fixes: #1310 Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/doc/developers/oauth2-provider.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/content/doc/developers/oauth2-provider.md b/docs/content/doc/developers/oauth2-provider.md
index ad2ff78e6c..29305a24ca 100644
--- a/docs/content/doc/developers/oauth2-provider.md
+++ b/docs/content/doc/developers/oauth2-provider.md
@@ -30,7 +30,9 @@ Gitea supports acting as an OAuth2 provider to allow third party applications to
## Supported OAuth2 Grants
-At the moment Gitea only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636) extension.
+At the moment Gitea only supports the [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) standard with additional support of the following extensions:
+- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636)
+- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth)
To use the Authorization Code Grant as a third party application it is required to register a new application via the "Settings" (`/user/settings/applications`) section of the settings.