Commit 774a911
Changed files (1)
pkg
web
pkg/web/http_context.go
@@ -23,7 +23,7 @@ func (h *HttpContext) Router() *http.ServeMux {
mux := http.NewServeMux()
mux.Handle("/", http.HandlerFunc(h.Default))
- mux.Handle("/.well-known/", http.StripPrefix("/.well-known", wellKnownMux(h)))
+ mux.Handle("/.well-known/", h.wellKnownMux())
mux.Handle("/authorize", http.HandlerFunc(h.Authorize))
mux.Handle("/revoke", http.HandlerFunc(http.NotFound))
mux.Handle("/token", http.HandlerFunc(h.Token))
@@ -31,9 +31,9 @@ func (h *HttpContext) Router() *http.ServeMux {
return mux
}
-func wellKnownMux(h *HttpContext) *http.ServeMux {
+func (h *HttpContext) wellKnownMux() *http.ServeMux {
mux := http.NewServeMux()
- mux.Handle("/jwks.json", http.HandlerFunc(h.JsonWebKeySets))
- mux.Handle("/openid-configuration", http.HandlerFunc(h.OpenIdConfiguration))
+ mux.Handle("/.well-known/jwks.json", http.HandlerFunc(h.JsonWebKeySets))
+ mux.Handle("/.well-known/openid-configuration", http.HandlerFunc(h.OpenIdConfiguration))
return mux
}