Skip to content

Commit 36f338a

Browse files
committed
Update demoInMemoryOAuthProvider.ts
1 parent 02ce81b commit 36f338a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/examples/server/demoInMemoryOAuthProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class DemoInMemoryAuthProvider implements OAuthServerProvider {
2929
private tokens = new Map<string, AuthInfo>();
3030
private validateResource?: (resource?: URL) => boolean;
3131

32-
constructor(mcpServerUrl?: URL) {
32+
constructor({mcpServerUrl}: {mcpServerUrl?: URL} = {}) {
3333
if (mcpServerUrl) {
3434
const expectedResource = resourceUrlFromServerUrl(mcpServerUrl);
3535
this.validateResource = (resource?: URL) => {
@@ -157,7 +157,7 @@ export const setupAuthServer = (authServerUrl: URL, mcpServerUrl: URL): OAuthMet
157157
// how to separate an OAuth Authorization Server from a Resource
158158
// server in the SDK. The SDK is not intended to be provide a standalone
159159
// authorization server.
160-
const provider = new DemoInMemoryAuthProvider(mcpServerUrl);
160+
const provider = new DemoInMemoryAuthProvider({mcpServerUrl});
161161
const authApp = express();
162162
authApp.use(express.json());
163163
// For introspection requests

0 commit comments

Comments
 (0)