Fix build and lint issues
- Corrected imports in external-verifier.ts (OAuthTokenVerifier from provider.js) - Fixed InvalidTokenError import from errors.js - Changed logger.warn to logger.info (warn method doesn't exist) - Removed unused OAuthTokens import from services/auth.ts
This commit is contained in:
parent
0135abd62a
commit
03deb88ea0
2 changed files with 6 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { OAuthTokenVerifier } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
||||
import { AuthInfo, InvalidTokenError } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
||||
import { OAuthTokenVerifier } from '@modelcontextprotocol/sdk/server/auth/provider.js';
|
||||
import { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
||||
import { InvalidTokenError } from '@modelcontextprotocol/sdk/server/auth/errors.js';
|
||||
import { TokenIntrospectionResponse } from '../../shared/types.js';
|
||||
import { logger } from '../utils/logger.js';
|
||||
|
||||
|
|
@ -53,10 +54,8 @@ export class ExternalAuthVerifier implements OAuthTokenVerifier {
|
|||
// Extract user ID from standard 'sub' claim or custom 'userId' field
|
||||
const userId = data.sub || data.userId;
|
||||
if (!userId) {
|
||||
logger.warn('Token introspection response missing user ID', {
|
||||
hasS
|
||||
|
||||
: !!data.sub,
|
||||
logger.info('Token introspection response missing user ID', {
|
||||
hasSub: !!data.sub,
|
||||
hasUserId: !!data.userId,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { redisClient } from "../redis.js";
|
||||
import { McpInstallation, PendingAuthorization, TokenExchange } from "../types.js";
|
||||
import { OAuthClientInformationFull, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
|
||||
import { OAuthClientInformationFull } from "@modelcontextprotocol/sdk/shared/auth.js";
|
||||
|
||||
// Re-export from shared modules for backward compatibility
|
||||
export {
|
||||
|
|
|
|||
Loading…
Reference in a new issue