Began work on auth_proxy feature (#1932), and began work on testing http api, and auth middleware

This commit is contained in:
Torkel Ödegaard
2015-05-01 11:55:59 +02:00
parent e7ac367392
commit d1e9b6d6ae
5 changed files with 91 additions and 5 deletions
+13
View File
@@ -87,6 +87,12 @@ var (
AnonymousOrgName string
AnonymousOrgRole string
// Auth proxy settings
AuthProxyEnabled bool
AuthProxyHeaderName string
AuthProxyHeaderProperty string
AuthProxyAutoSignUp bool
// Session settings.
SessionOptions session.Options
@@ -376,6 +382,13 @@ func NewConfigContext(args *CommandLineArgs) {
AnonymousOrgName = Cfg.Section("auth.anonymous").Key("org_name").String()
AnonymousOrgRole = Cfg.Section("auth.anonymous").Key("org_role").String()
// auth proxy
authProxy := Cfg.Section("auth.proxy")
AuthProxyEnabled = authProxy.Key("enabled").MustBool(false)
AuthProxyHeaderName = authProxy.Key("header_name").String()
AuthProxyHeaderProperty = authProxy.Key("header_property").String()
AuthProxyAutoSignUp = authProxy.Key("auto_sign_up").MustBool(true)
// PhantomJS rendering
ImagesDir = filepath.Join(DataPath, "png")
PhantomDir = filepath.Join(HomePath, "vendor/phantomjs")