Skip to content

examples: check token audience and set UserID in auth examples - #1388

Merged
guglielmo-san merged 2 commits into
modelcontextprotocol:mainfrom
kanywst:examples-auth-checks
Oct 12, 2026
Merged

guglielmo-san merged 2 commits into
modelcontextprotocol:mainfrom
kanywst:examples-auth-checks

Conversation

@kanywst

@kanywst kanywst commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

examples/auth/server accepts tokens issued for other resources, and examples/server/auth-middleware never sets TokenInfo.UserID, so its sessions aren't bound to a user. docs/protocol.md leaves both to the TokenVerifier.

@guglielmo-san
guglielmo-san merged commit d1a225e into modelcontextprotocol:main Oct 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants