mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-23 21:18:09 +02:00
authenticate: fix branding for webauthn device registration page
This commit is contained in:
parent
f07c912557
commit
983e16f877
2 changed files with 6 additions and 2 deletions
|
@ -744,6 +744,7 @@ func (a *Authenticate) getWebauthnState(ctx context.Context) (*webauthn.State, e
|
||||||
SessionState: ss,
|
SessionState: ss,
|
||||||
SessionStore: state.sessionStore,
|
SessionStore: state.sessionStore,
|
||||||
RelyingParty: state.webauthnRelyingParty,
|
RelyingParty: state.webauthnRelyingParty,
|
||||||
|
BrandingOptions: a.options.Load().BrandingOptions,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ type State struct {
|
||||||
SessionState *sessions.State
|
SessionState *sessions.State
|
||||||
SessionStore sessions.SessionStore
|
SessionStore sessions.SessionStore
|
||||||
SharedKey []byte
|
SharedKey []byte
|
||||||
|
BrandingOptions httputil.BrandingOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
// A StateProvider provides state for the handler.
|
// A StateProvider provides state for the handler.
|
||||||
|
@ -398,11 +399,13 @@ func (h *Handler) handleView(w http.ResponseWriter, r *http.Request, state *Stat
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return ui.ServePage(w, r, "WebAuthnRegistration", map[string]interface{}{
|
m := map[string]interface{}{
|
||||||
"creationOptions": creationOptions,
|
"creationOptions": creationOptions,
|
||||||
"requestOptions": requestOptions,
|
"requestOptions": requestOptions,
|
||||||
"selfUrl": r.URL.String(),
|
"selfUrl": r.URL.String(),
|
||||||
})
|
}
|
||||||
|
httputil.AddBrandingOptionsToMap(m, state.BrandingOptions)
|
||||||
|
return ui.ServePage(w, r, "WebAuthnRegistration", m)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) saveSessionAndRedirect(w http.ResponseWriter, r *http.Request, state *State, rawRedirectURI string) error {
|
func (h *Handler) saveSessionAndRedirect(w http.ResponseWriter, r *http.Request, state *State, rawRedirectURI string) error {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue