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

Function ResolveResourcePath

pkg/http/oauth/oauth.go:189–195  ·  view source on GitHub ↗

ResolveResourcePath returns the externally visible resource path for a request. Exported for use by middleware.

(r *http.Request, cfg *Config)

Source from the content-addressed store, hash-verified

187// ResolveResourcePath returns the externally visible resource path for a request.
188// Exported for use by middleware.
189func ResolveResourcePath(r *http.Request, cfg *Config) string {
190 basePath := ""
191 if cfg != nil {
192 basePath = cfg.ResourcePath
193 }
194 return resolveResourcePath(r.URL.Path, basePath)
195}
196
197// buildResourceURL constructs the full resource URL for OAuth metadata.
198func (h *AuthHandler) buildResourceURL(r *http.Request, resourcePath string) string {

Callers 3

WithScopeChallengeFunction · 0.92
sendAuthChallengeFunction · 0.92
TestResolveResourcePathFunction · 0.85

Calls 1

resolveResourcePathFunction · 0.85

Tested by 1

TestResolveResourcePathFunction · 0.68