Allow a whitelist of email addresses
This commit is contained in:

committed by
Thom Seddon

parent
36fffd2382
commit
eaad0a9054
6
main.go
6
main.go
@ -141,6 +141,7 @@ func main() {
|
||||
cookieSecret := flag.String("cookie-secret", "", "depreciated")
|
||||
cookieSecure := flag.Bool("cookie-secure", true, "Use secure cookies")
|
||||
domainList := flag.String("domain", "", "Comma separated list of email domains to allow")
|
||||
emailWhitelist := flag.String("whitelist", "", "Comma separated list of emails to allow")
|
||||
direct := flag.Bool("direct", false, "Run in direct mode (use own hostname as oppose to X-Forwarded-Host, used for testing/development)")
|
||||
prompt := flag.String("prompt", "", "Space separated list of OpenID prompt options")
|
||||
|
||||
@ -182,6 +183,10 @@ func main() {
|
||||
if *domainList != "" {
|
||||
domain = strings.Split(*domainList, ",")
|
||||
}
|
||||
var whitelist []string
|
||||
if *emailWhitelist != "" {
|
||||
whitelist = strings.Split(*emailWhitelist, ",")
|
||||
}
|
||||
|
||||
// Setup
|
||||
fw = &ForwardAuth{
|
||||
@ -215,6 +220,7 @@ func main() {
|
||||
CookieSecure: *cookieSecure,
|
||||
|
||||
Domain: domain,
|
||||
Whitelist: whitelist,
|
||||
|
||||
Direct: *direct,
|
||||
|
||||
|
Reference in New Issue
Block a user