add HTTP Request to TokenVerifier (#404)

The request might be needed to verify the token.

Fixes #403.
This commit is contained in:
Jonathan Amsterdam 2025-09-03 16:23:42 -04:00 • committed by GitHub
commit d0c5943f25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1270,7 +1270,7 @@ func TestTokenInfo(t *testing.T) {
AddTool(server, &Tool{Name: "tokenInfo", Description: "return token info"}, tokenInfo)
streamHandler := NewStreamableHTTPHandler(func(req *http.Request) *Server { return server }, nil)
verifier := func(context.Context, string) (*auth.TokenInfo, error) {
verifier := func(context.Context, string, *http.Request) (*auth.TokenInfo, error) {
return &auth.TokenInfo{
Scopes: []string{"scope"},
// Expiration is far, far in the future.