Update simpleStreamableHttp.ts
This commit is contained in:
parent
d58c2eb114
commit
aebb2ab197
1 changed files with 3 additions and 3 deletions
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue