mcp: handle and pass upstream oauth2 tokens (#5595)

This commit is contained in:
Denis Mishin 2025-05-01 12:42:31 -04:00 committed by GitHub
parent 561b6040b5
commit 9d66f762e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 337 additions and 80 deletions

View file

@ -65,7 +65,7 @@ func newAuthorizeStateFromConfig(
}
state.mcp = mcp
state.evaluator, err = newPolicyEvaluator(ctx, cfg.Options, store, previousEvaluator, evaluator.WithMCPAccessTokenProvider(mcp.CreateAccessTokenForSession))
state.evaluator, err = newPolicyEvaluator(ctx, cfg.Options, store, previousEvaluator, evaluator.WithMCPAccessTokenProvider(mcp))
if err != nil {
return nil, fmt.Errorf("authorize: failed to update policy with options: %w", err)
}