Update simpleStreamableHttp.ts

This commit is contained in:
Olivier Chafik 2025-06-18 11:39:29 +01:00
commit aebb2ab197
No known key found for this signature in database

View file

@ -311,11 +311,11 @@ if (useOAuth) {
const data = await response.json();
if (strictOAuth) {
if (!data.resource) {
throw new Error('Resource Indicator (RFC8707) missing');
if (!data.aud) {
}
if (data.resource !== mcpServerUrl) {
throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.resource}`);
if (data.aud !== mcpServerUrl.href) {
throw new Error(`Expected resource indicator ${mcpServerUrl}, got: ${data.aud}`);
}
}