MCPcopy Create free account
hub / github.com/bytebase/bytebase / withAccessToken

Function withAccessToken

backend/api/mcp/tool_http.go:101–103  ·  view source on GitHub ↗

withAccessToken adds the access token to the context.

(ctx context.Context, token string)

Source from the content-addressed store, hash-verified

99
100// withAccessToken adds the access token to the context.
101func withAccessToken(ctx context.Context, token string) context.Context {
102 return context.WithValue(ctx, accessTokenKey{}, token)
103}
104
105// getAccessToken retrieves the access token from the context.
106func getAccessToken(ctx context.Context) string {

Callers 2

authMiddlewareMethod · 0.85

Calls

no outgoing calls

Tested by 1