Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildHTTPClient ¶
func BuildHTTPClient( setupCtx context.Context, lifecycleCtx context.Context, server *mcpserverapi.MCPServer, secrets *compstore.ComponentStore, jwt security.Handler, ) (*http.Client, error)
BuildHTTPClient returns an http.Client configured with:
- Static header injection from transport headers.
- OAuth2 client credentials token injection (if auth.oauth2 is set; errors if secrets is nil).
- SPIFFE JWT injection via the configured header (if auth.spiffe.jwt is set and jwt != nil).
OAuth2 and SPIFFE are mutually exclusive in practice; if both are configured, OAuth2 takes precedence and SPIFFE is ignored.
setupCtx controls one-shot setup work (secret fetches). lifecycleCtx controls background work that must outlive the connection setup, specifically the OAuth2 token refresher, which is invoked on every token expiry for the lifetime of the returned client.
func HTTPTransportConfig ¶
func HTTPTransportConfig(server *mcpserverapi.MCPServer) ([]commonapi.NameValuePair, *mcpserverapi.MCPAuth)
HTTPTransportConfig extracts headers and auth from whichever HTTP transport is configured on the MCPServer. Returns nil slices/pointers for stdio.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.