From 1e48d89e004861eab9d1388c34d10ea61a982627 Mon Sep 17 00:00:00 2001 From: Jehiah Czebotar Date: Fri, 24 Jul 2015 16:09:33 -0400 Subject: [PATCH] clarify required email validation settings --- options.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/options.go b/options.go index bcf7d29..99e0ef4 100644 --- a/options.go +++ b/options.go @@ -103,6 +103,9 @@ func (o *Options) Validate() error { if o.ClientSecret == "" { msgs = append(msgs, "missing setting: client-secret") } + if o.AuthenticatedEmailsFile == "" && len(o.EmailDomains) == 0 && o.HtpasswdFile == "" { + msgs = append(msgs, "missing setting for email validation: email-domain or authenticated-emails-file required.\n use email-domain=* to authorize all email addresses") + } o.redirectUrl, msgs = parseUrl(o.RedirectUrl, "redirect", msgs)