You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why. A program that embeds ToolHive's MCP handlers behind its own token verification has to hand them an auth.Identity. TokenValidator fills that struct, and the rules keep growing: AdmissionRoute (interactive or
delegated) is read by session binding and the per-user credential read, SessionlessGrant is read by the Cedar
authorizer, and AdmittedAfterExpiry marks expired-token admission. An embedder that copies these rules will drift.
What.
Decide the boundary. Does the function only build the Identity, or does it also refuse marked tokens that
aren't delegated and load upstream tokens by tsid, as TokenValidator.Middleware does? Its inputs must include
what the route classification needs today: whether the key came from the in-process key provider, whether the
caller is bound to the embedded issuer, and whether an audience was checked.
Build it.TokenValidator calls the same function, so there is one implementation.
Done when.
TokenValidator and the function produce identical Identity values for interactive, delegated (marked),
session-less and machine tokens, including AdmissionRoute, SessionlessGrant and AdmittedAfterExpiry, shown by
a table test.
Activity