Skip to content

Commit dc2ac83

Browse files
committed
Changes to test Inspector PR modelcontextprotocol#345. Remove when that PR is merged
modelcontextprotocol/inspector#345
1 parent 16ea277 commit dc2ac83

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/examples/server/demoInMemoryOAuthProvider.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ import { resourceUrlFromServerUrl } from '../../shared/auth-utils.js';
99

1010

1111
export class DemoInMemoryClientsStore implements OAuthRegisteredClientsStore {
12-
private clients = new Map<string, OAuthClientInformationFull>();
12+
private clients = new Map<string, OAuthClientInformationFull>([
13+
// 👇 Preregistered OAuth client here
14+
[
15+
"preregistered-client-id",
16+
{
17+
client_id: "preregistered-client-id",
18+
redirect_uris: ["http://localhost:6274/oauth/callback"],
19+
scope: "mcp:tools",
20+
},
21+
],
22+
]);
1323

1424
async getClient(clientId: string) {
1525
return this.clients.get(clientId);
1626
}
1727

18-
async registerClient(clientMetadata: OAuthClientInformationFull) {
28+
/* async registerClient(clientMetadata: OAuthClientInformationFull) {
1929
this.clients.set(clientMetadata.client_id, clientMetadata);
2030
return clientMetadata;
21-
}
31+
}*/
2232
}
2333

2434
/**

0 commit comments

Comments
 (0)