M internal/server/web/embed.go => internal/server/web/embed.go +2 -2
@@ 23,8 23,8 @@ var distFS embed.FS
// Config holds the values injected into the SPA's index.html as
// window.__LETHE_CONFIG__. It must not contain any tokens (IV4).
type Config struct {
- Issuer string
- ClientID string
+ Issuer string `json:"issuer"`
+ ClientID string `json:"client_id"`
}
// DistFS returns the sub-filesystem rooted at "dist" within the embedded FS.
M internal/server/web/embed_test.go => internal/server/web/embed_test.go +1 -1
@@ 31,7 31,7 @@ func TestHandler_InjectsConfigIntoIndex(t *testing.T) {
body, _ := io.ReadAll(resp.Body)
bodyStr := string(body)
- want := `window.__LETHE_CONFIG__={"Issuer":"http://stub","ClientID":"lethe"}`
+ want := `window.__LETHE_CONFIG__={"issuer":"http://stub","client_id":"lethe"}`
if !strings.Contains(bodyStr, want) {
t.Errorf("body does not contain %q\nbody (first 500 chars):\n%s", want, truncate(bodyStr, 500))
}