rename decline to reject

This commit is contained in:
ihrpr 2025-06-18 20:11:18 +01:00
commit e7a5e331f1
No known key found for this signature in database
2 changed files with 15 additions and 15 deletions

View file

@ -363,7 +363,7 @@ async function connect(url?: string): Promise<void> {
continue;
} else {
console.log('Maximum attempts reached. Declining request.');
return { action: 'decline' };
return { action: 'reject' };
}
}
@ -381,7 +381,7 @@ async function connect(url?: string): Promise<void> {
continue;
} else {
console.log('Maximum attempts reached. Declining request.');
return { action: 'decline' };
return { action: 'reject' };
}
}
@ -408,13 +408,13 @@ async function connect(url?: string): Promise<void> {
console.log('Please re-enter the information...');
continue;
} else {
return { action: 'decline' };
return { action: 'reject' };
}
}
}
console.log('Maximum attempts reached. Declining request.');
return { action: 'decline' };
return { action: 'reject' };
});
transport = new StreamableHTTPClientTransport(

View file

@ -205,12 +205,12 @@ const getServer = () => {
},
],
};
} else if (result.action === 'decline') {
} else if (result.action === 'reject') {
return {
content: [
{
type: 'text',
text: `No information was collected. User declined to provide ${infoType} information.`,
text: `No information was collected. User rejectd to provide ${infoType} information.`,
},
],
};
@ -458,7 +458,7 @@ if (useOAuth) {
}
const data = await response.json();
if (strictOAuth) {
if (!data.aud) {
throw new Error(`Resource Indicator (RFC8707) missing`);