ResolveResourcePath returns the externally visible resource path for a request. Exported for use by middleware.
(r *http.Request, cfg *Config)
| 187 | // ResolveResourcePath returns the externally visible resource path for a request. |
| 188 | // Exported for use by middleware. |
| 189 | func 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. |
| 198 | func (h *AuthHandler) buildResourceURL(r *http.Request, resourcePath string) string { |