Files
gns3-server/gns3server
yueguobin b184ea4c70 fix(mcp): renew an API-key session's JWT when it ages out
Tool handlers run in the session task created at initialize and inherit
its context; contextvars set by later requests never reach them. In a
long-lived API-key session (the documented setup — keys never expire)
the minted 24h JWT eventually expired while the transport kept
authenticating, so every tool call failed with 401.

Remember the raw API key at initialize; when the session's JWT has aged
out, take the current one from the per-request API-key cache (every
tools/call POST refreshes it) or re-mint synchronously. JWT logins are
unchanged: the client's own credential expiring is the client's
business.
2026-11-01 23:09:38 +08:00
..
2026-11-01 18:50:55 +07:00
2026-08-18 18:02:53 +02:00
2026-10-19 23:28:49 +07:00
2026-10-17 11:43:36 +03:00
2024-04-22 18:51:29 +07:00
2026-10-21 16:04:23 +07:00