1
0
mirror of https://github.com/go-gitea/gitea synced 2024-11-10 17:25:54 +01:00
gitea/routers/user
Johnny Oskarsson a07e67d9cc
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>
2021-01-02 00:33:27 +08:00
..
setting Check for notExist on profile repository page (#14197) 2020-12-31 15:45:54 +08:00
auth_openid.go hCaptcha Support (#12594) 2020-10-02 23:37:53 -04:00
auth.go Fix creating OAuth2 auth source from CLI (#14116) 2020-12-24 19:47:17 +00:00
avatar.go Direct avatar rendering (#13649) 2020-12-03 19:46:11 +01:00
home_test.go Fix milestones too many SQL variables bug (#10880) 2020-03-31 10:47:00 +03:00
home.go Team dashboards (#14159) 2020-12-27 21:58:03 +02:00
main_test.go Unit tests for wiki routers (#3022) 2017-11-30 17:52:15 +02:00
notification.go Fix notifications page links (#12838) 2020-09-15 07:06:08 +01:00
oauth.go Minimal OpenID Connect implementation (#14139) 2021-01-02 00:33:27 +08:00
profile.go rework heatmap permissions (#14080) 2020-12-22 03:53:37 +01:00
task.go Store task errors following migrations and display them (#13246) 2020-10-23 19:46:35 -04:00