Documentation
¶
Index ¶
- func BuildPerUserOAuthHeaders(headers http.Header, accessToken string) http.Header
- func BuildRedirectURIFromContext(ctx *schemas.BifrostContext) string
- func GetHeadersForToolExecution(ctx *schemas.BifrostContext, client *schemas.MCPClientState) http.Header
- func ResolvePerUserOAuthToken(ctx *schemas.BifrostContext, client *schemas.MCPClientState, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPerUserOAuthHeaders ¶
BuildPerUserOAuthHeaders clones the provided headers and adds the Bearer token, preserving any request-scoped extra headers already present.
func BuildRedirectURIFromContext ¶
func BuildRedirectURIFromContext(ctx *schemas.BifrostContext) string
BuildRedirectURIFromContext extracts the OAuth redirect URI from context.
func GetHeadersForToolExecution ¶
func GetHeadersForToolExecution(ctx *schemas.BifrostContext, client *schemas.MCPClientState) http.Header
GetHeadersForToolExecution sets additional headers for tool execution. It returns the headers for the tool execution.
func ResolvePerUserOAuthToken ¶
func ResolvePerUserOAuthToken(ctx *schemas.BifrostContext, client *schemas.MCPClientState, oauth2Provider schemas.OAuth2Provider) (string, error)
ResolvePerUserOAuthToken looks up the per-user OAuth access token for the given client. If no token exists yet, it initiates an OAuth flow and returns an MCPUserOAuthRequiredError.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.