Skip to content

Commit 096320e

Browse files
committed
feat: extend AuthInfo type to include userId in authentication schema
1 parent 222b1d7 commit 096320e

File tree

1 file changed

+3
-1
lines changed
  • exercises/04.user/01.problem.token/src

1 file changed

+3
-1
lines changed

exercises/04.user/01.problem.token/src/auth.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { type AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js'
1+
import { type AuthInfo as SDKAuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js'
22
import { z } from 'zod'
33
import { EPIC_ME_AUTH_SERVER_URL } from './client.ts'
44

5+
export type AuthInfo = SDKAuthInfo & { extra: { userId: string } }
6+
57
const introspectResponseSchema = z.discriminatedUnion('active', [
68
z.object({
79
active: z.literal(true),

0 commit comments

Comments
 (0)