@@ -79,31 +79,32 @@ type OAuthProxy struct {
7979 AuthOnlyPath string
8080 UserInfoPath string
8181
82− redirectURL *url.URL // the url to receive requests at
83− whitelistDomains []string
84− provider providers.Provider
85− sessionStore sessionsapi.SessionStore
86− ProxyPrefix string
87− SignInMessage string
88− HtpasswdFile *HtpasswdFile
89− DisplayHtpasswdForm bool
90− serveMux http.Handler
91− SetXAuthRequest bool
92− PassBasicAuth bool
93− SkipProviderButton bool
94− PassUserHeaders bool
95− BasicAuthPassword string
96− PassAccessToken bool
97− SetAuthorization bool
98− PassAuthorization bool
99− skipAuthRegex []string
100− skipAuthPreflight bool
101− skipJwtBearerTokens bool
102− jwtBearerVerifiers []*oidc.IDTokenVerifier
103− compiledRegex []*regexp.Regexp
104− templates *template.Template
105− Banner string
106− Footer string
82+ redirectURL *url.URL // the url to receive requests at
83+ whitelistDomains []string
84+ provider providers.Provider
85+ providerNameOverride string
86+ sessionStore sessionsapi.SessionStore
87+ ProxyPrefix string
88+ SignInMessage string
89+ HtpasswdFile *HtpasswdFile
90+ DisplayHtpasswdForm bool
91+ serveMux http.Handler
92+ SetXAuthRequest bool
93+ PassBasicAuth bool
94+ SkipProviderButton bool
95+ PassUserHeaders bool
96+ BasicAuthPassword string
97+ PassAccessToken bool
98+ SetAuthorization bool
99+ PassAuthorization bool
100+ skipAuthRegex []string
101+ skipAuthPreflight bool
102+ skipJwtBearerTokens bool
103+ jwtBearerVerifiers []*oidc.IDTokenVerifier
104+ compiledRegex []*regexp.Regexp
105+ templates *template.Template
106+ Banner string
107+ Footer string
107108}
108109
109110// UpstreamProxy represents an upstream server to proxy to
@@ -282,28 +283,29 @@ func NewOAuthProxy(opts *Options, validator func(string) bool) *OAuthProxy {
282283 AuthOnlyPath: fmt.Sprintf("%s/auth", opts.ProxyPrefix),
283284 UserInfoPath: fmt.Sprintf("%s/userinfo", opts.ProxyPrefix),
284285
285− ProxyPrefix: opts.ProxyPrefix,
286− provider: opts.provider,
287− sessionStore: opts.sessionStore,
288− serveMux: serveMux,
289− redirectURL: redirectURL,
290− whitelistDomains: opts.WhitelistDomains,
291− skipAuthRegex: opts.SkipAuthRegex,
292− skipAuthPreflight: opts.SkipAuthPreflight,
293− skipJwtBearerTokens: opts.SkipJwtBearerTokens,
294− jwtBearerVerifiers: opts.jwtBearerVerifiers,
295− compiledRegex: opts.CompiledRegex,
296− SetXAuthRequest: opts.SetXAuthRequest,
297− PassBasicAuth: opts.PassBasicAuth,
298− PassUserHeaders: opts.PassUserHeaders,
299− BasicAuthPassword: opts.BasicAuthPassword,
300− PassAccessToken: opts.PassAccessToken,
301− SetAuthorization: opts.SetAuthorization,
302− PassAuthorization: opts.PassAuthorization,
303− SkipProviderButton: opts.SkipProviderButton,
304− templates: loadTemplates(opts.CustomTemplatesDir),
305− Banner: opts.Banner,
306− Footer: opts.Footer,
286+ ProxyPrefix: opts.ProxyPrefix,
287+ provider: opts.provider,
288+ providerNameOverride: opts.ProviderName,
289+ sessionStore: opts.sessionStore,
290+ serveMux: serveMux,
291+ redirectURL: redirectURL,
292+ whitelistDomains: opts.WhitelistDomains,
293+ skipAuthRegex: opts.SkipAuthRegex,
294+ skipAuthPreflight: opts.SkipAuthPreflight,
295+ skipJwtBearerTokens: opts.SkipJwtBearerTokens,
296+ jwtBearerVerifiers: opts.jwtBearerVerifiers,
297+ compiledRegex: opts.CompiledRegex,
298+ SetXAuthRequest: opts.SetXAuthRequest,
299+ PassBasicAuth: opts.PassBasicAuth,
300+ PassUserHeaders: opts.PassUserHeaders,
301+ BasicAuthPassword: opts.BasicAuthPassword,
302+ PassAccessToken: opts.PassAccessToken,
303+ SetAuthorization: opts.SetAuthorization,
304+ PassAuthorization: opts.PassAuthorization,
305+ SkipProviderButton: opts.SkipProviderButton,
306+ templates: loadTemplates(opts.CustomTemplatesDir),
307+ Banner: opts.Banner,
308+ Footer: opts.Footer,
307309 }
308310}
309311
@@ -465,6 +467,9 @@ func (p *OAuthProxy) SignInPage(rw http.ResponseWriter, req *http.Request, code
465467 ProxyPrefix: p.ProxyPrefix,
466468 Footer: template.HTML(p.Footer),
467469 }
470+ if p.providerNameOverride != "" {
471+ t.ProviderName = p.providerNameOverride
472+ }
468473 p.templates.ExecuteTemplate(rw, "sign_in.html", t)
469474}
470475