main
 1package web
 2
 3import (
 4	_ "embed"
 5	"net/http"
 6	"text/template"
 7)
 8
 9//go:embed templates/openid-configuration.json
10var oidcConfig string
11
12var (
13	tmpl = template.Must(template.New("").Parse(string(oidcConfig)))
14)
15
16func (h *HttpContext) OpenIdConfiguration(w http.ResponseWriter, r *http.Request) {
17	w.Header().Set("Content-Type", "application/json")
18	tmpl.Execute(w, struct{ Issuer string }{Issuer: h.cfg.Issuer})
19}