MCPcopy
hub / github.com/github/github-mcp-server / RegisterRoutes

Method RegisterRoutes

pkg/http/oauth/oauth.go:105–112  ·  view source on GitHub ↗

RegisterRoutes registers the OAuth protected resource metadata routes.

(r chi.Router)

Source from the content-addressed store, hash-verified

103
104// RegisterRoutes registers the OAuth protected resource metadata routes.
105func (h *AuthHandler) RegisterRoutes(r chi.Router) {
106 for _, pattern := range routePatterns {
107 for _, route := range h.routesForPattern(pattern) {
108 path := OAuthProtectedResourcePrefix + route
109 r.Handle(path, h.metadataHandler())
110 }
111 }
112}
113
114func (h *AuthHandler) metadataHandler() http.Handler {
115 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Calls 2

routesForPatternMethod · 0.95
metadataHandlerMethod · 0.95