feat(auth): implement proxied /.well-known/oauth-authorization-server (#244)

Signed-off-by: Marc Nuri <marc@marcnuri.com>
This commit is contained in:
Marc Nuri
2025-08-06 15:51:45 +03:00
committed by GitHub
parent 94b85990e3
commit aba5f548d8
4 changed files with 67 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ const (
func AuthorizationMiddleware(requireOAuth bool, serverURL string, oidcProvider *oidc.Provider, mcpServer *mcp.Server) func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == healthEndpoint || r.URL.Path == oauthProtectedResourceEndpoint {
if r.URL.Path == healthEndpoint || r.URL.Path == oauthProtectedResourceEndpoint || r.URL.Path == oauthAuthorizationServerEndpoint {
next.ServeHTTP(w, r)
return
}