summaryrefslogtreecommitdiffstats
path: root/modules/setting/service.go
diff options
context:
space:
mode:
authorWill Norris <will@willnorris.com>2022-08-15 23:30:27 -0700
committerGitHub <noreply@github.com>2022-08-16 14:30:27 +0800
commit82f89ff996b40e30a7790d13dfa5fa8949a6d620 (patch)
tree14a6e7016178e346a798d6c30af382d35b71d3f7 /modules/setting/service.go
parent1f146090ecbd9876ed41ddccc4d05ee1bedbb48e (diff)
downloadgitea-82f89ff996b40e30a7790d13dfa5fa8949a6d620.tar.gz
gitea-82f89ff996b40e30a7790d13dfa5fa8949a6d620.zip
auth/reverseproxy: Add support for full name (#20776)
This adds support for getting the user's full name from the reverse proxy in addition to username and email. Tested locally with caddy serving as reverse proxy with Tailscale authentication. Signed-off-by: Will Norris <will@tailscale.com> Signed-off-by: Will Norris <will@tailscale.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/setting/service.go')
-rw-r--r--modules/setting/service.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/service.go b/modules/setting/service.go
index af8a72cc6d..10e3899950 100644
--- a/modules/setting/service.go
+++ b/modules/setting/service.go
@@ -38,6 +38,7 @@ var Service = struct {
EnableReverseProxyAuth bool
EnableReverseProxyAutoRegister bool
EnableReverseProxyEmail bool
+ EnableReverseProxyFullName bool
EnableCaptcha bool
RequireExternalRegistrationCaptcha bool
RequireExternalRegistrationPassword bool
@@ -127,6 +128,7 @@ func newService() {
Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool()
Service.EnableReverseProxyEmail = sec.Key("ENABLE_REVERSE_PROXY_EMAIL").MustBool()
+ Service.EnableReverseProxyFullName = sec.Key("ENABLE_REVERSE_PROXY_FULL_NAME").MustBool()
Service.EnableCaptcha = sec.Key("ENABLE_CAPTCHA").MustBool(false)
Service.RequireExternalRegistrationCaptcha = sec.Key("REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA").MustBool(Service.EnableCaptcha)
Service.RequireExternalRegistrationPassword = sec.Key("REQUIRE_EXTERNAL_REGISTRATION_PASSWORD").MustBool()