utils

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPerUserOAuthHeaders

func BuildPerUserOAuthHeaders(headers http.Header, accessToken string) http.Header

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL