forgejo-federation/services/auth/source/oauth2
zeripath 0981ec30c3
Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766)
* Add setting to OAuth handlers to override local 2FA settings

This PR adds a setting to OAuth and OpenID login sources to allow the source to
override local 2FA requirements.

Fix #13939

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix regression from #16544

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add scopes settings

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix trace logging in auth_openid

Signed-off-by: Andrew Thornton <art27@cantab.net>

* add required claim options

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Move UpdateExternalUser to externalaccount

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Allow OAuth2/OIDC to set Admin/Restricted status

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Allow use of the same group claim name for the prohibit login value

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixup! Move UpdateExternalUser to externalaccount

* as per wxiaoguang

Signed-off-by: Andrew Thornton <art27@cantab.net>

* add label back in

Signed-off-by: Andrew Thornton <art27@cantab.net>

* adjust localisation

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-12-14 16:37:11 +08:00
..
assert_interface_test.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
init.go Simplify Gothic to use our session store instead of creating a different store (#17507) 2021-11-03 08:33:54 +08:00
jwtsigningkey.go refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
providers.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
providers_base.go Add microsoft oauth2 providers (#16544) 2021-08-05 21:11:08 -04:00
providers_custom.go Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766) 2021-12-14 16:37:11 +08:00
providers_openid.go Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766) 2021-12-14 16:37:11 +08:00
providers_simple.go Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766) 2021-12-14 16:37:11 +08:00
source.go Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766) 2021-12-14 16:37:11 +08:00
source_authenticate.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
source_callout.go Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) 2021-07-29 18:53:18 +01:00
source_name.go Add microsoft oauth2 providers (#16544) 2021-08-05 21:11:08 -04:00
source_register.go Move oauth2 error to oauth2 service package (#17603) 2021-11-11 01:51:09 +08:00
store.go A better go code formatter, and now make fmt can run in Windows (#17684) 2021-11-17 20:34:35 +08:00
token.go A better go code formatter, and now make fmt can run in Windows (#17684) 2021-11-17 20:34:35 +08:00
urlmapping.go Add microsoft oauth2 providers (#16544) 2021-08-05 21:11:08 -04:00