@@ -213,6 +213,7 @@ func NewOAuthProxy(opts *options.Options, validator func(string) bool) (*OAuthPr
213 trustedIPs: trustedIPs,
213 trustedIPs: trustedIPs,
214 Banner: opts.Banner,
214 Banner: opts.Banner,
215 Footer: opts.Footer,
215 Footer: opts.Footer,
216+ SignInMessage: buildSignInMessage(opts),
217 basicAuthValidator: basicAuthValidator,
218 basicAuthValidator: basicAuthValidator,
218 displayHtpasswdForm: basicAuthValidator != nil,
219 displayHtpasswdForm: basicAuthValidator != nil,
@@ -255,6 +256,24 @@ func buildSessionChain(opts *options.Options, sessionStore sessionsapi.SessionSt
255 return chain
256 return chain
259+func buildSignInMessage(opts *options.Options) string {
261+ if len(opts.Banner) >= 1 {
262+ if opts.Banner == "-" {
267+ } else if len(opts.EmailDomains) != 0 && opts.AuthenticatedEmailsFile == "" {
268+ if len(opts.EmailDomains) > 1 {
269+ msg = fmt.Sprintf("Authenticate using one of the following domains: %v", strings.Join(opts.EmailDomains, ", "))
270+ } else if opts.EmailDomains[0] != "*" {
271+ msg = fmt.Sprintf("Authenticate using %v", opts.EmailDomains[0])
258// GetRedirectURI returns the redirectURL that the upstream OAuth Provider will
277// GetRedirectURI returns the redirectURL that the upstream OAuth Provider will
259// redirect clients to once authenticated
278// redirect clients to once authenticated
260func (p *OAuthProxy) GetRedirectURI(host string) string {
279func (p *OAuthProxy) GetRedirectURI(host string) string {