mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
authenticate: apply branding to sign out pages (#5044)
Add support for the Enterprise branding options to the sign_out and signed_out page handlers.
This commit is contained in:
parent
40655e491a
commit
e8edb465f4
4 changed files with 67 additions and 6 deletions
|
@ -89,7 +89,7 @@ func (a *Authenticate) mountDashboard(r *mux.Router) {
|
|||
|
||||
// routes that don't need a session:
|
||||
sr.Path("/sign_out").Handler(httputil.HandlerFunc(a.SignOut))
|
||||
sr.Path("/signed_out").Handler(handlers.SignedOut(handlers.SignedOutData{})).Methods(http.MethodGet)
|
||||
sr.Path("/signed_out").Handler(httputil.HandlerFunc(a.signedOut)).Methods(http.MethodGet)
|
||||
|
||||
// routes that need a session:
|
||||
sr = sr.NewRoute().Subrouter()
|
||||
|
@ -186,7 +186,8 @@ func (a *Authenticate) SignOut(w http.ResponseWriter, r *http.Request) error {
|
|||
}
|
||||
|
||||
handlers.SignOutConfirm(handlers.SignOutConfirmData{
|
||||
URL: urlutil.SignOutURL(r, authenticateURL, a.state.Load().sharedKey),
|
||||
URL: urlutil.SignOutURL(r, authenticateURL, a.state.Load().sharedKey),
|
||||
BrandingOptions: a.options.Load().BrandingOptions,
|
||||
}).ServeHTTP(w, r)
|
||||
return nil
|
||||
}
|
||||
|
@ -240,6 +241,13 @@ func (a *Authenticate) signOutRedirect(w http.ResponseWriter, r *http.Request) e
|
|||
return nil
|
||||
}
|
||||
|
||||
func (a *Authenticate) signedOut(w http.ResponseWriter, r *http.Request) error {
|
||||
handlers.SignedOut(handlers.SignedOutData{
|
||||
BrandingOptions: a.options.Load().BrandingOptions,
|
||||
}).ServeHTTP(w, r)
|
||||
return nil
|
||||
}
|
||||
|
||||
// reauthenticateOrFail starts the authenticate process by redirecting the
|
||||
// user to their respective identity provider. This function also builds the
|
||||
// 'state' parameter which is encrypted and includes authenticating data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue