@ateam-ai/mcp 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/http.js +9 -2
package/package.json
CHANGED
package/src/http.js
CHANGED
|
@@ -417,9 +417,16 @@ function seedCredentials(req, sessionId) {
|
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
// Default: use the bearer token itself as credentials
|
|
420
|
+
// Default: use the bearer token itself as credentials.
|
|
421
|
+
// `explicit: true` — a Bearer is a per-connection credential the user
|
|
422
|
+
// deliberately configured (OAuth authorize page, or the plugin's userConfig
|
|
423
|
+
// key injected as `Authorization: Bearer`). Unlike an ambient ADAS_API_KEY
|
|
424
|
+
// env var baked into shared MCP config, it carries explicit tenant intent, so
|
|
425
|
+
// it satisfies isExplicitlyAuthenticated and tenant tools work without a
|
|
426
|
+
// redundant ateam_auth call. (The env-var guard in tools.js is unaffected —
|
|
427
|
+
// env creds never flow through here; this path only fires for a real Bearer.)
|
|
421
428
|
const parsed = parseApiKey(token);
|
|
422
429
|
if (parsed.isValid) {
|
|
423
|
-
setSessionCredentials(sessionId, { tenant: parsed.tenant, apiKey: token });
|
|
430
|
+
setSessionCredentials(sessionId, { tenant: parsed.tenant, apiKey: token, explicit: true });
|
|
424
431
|
}
|
|
425
432
|
}
|