n8n
Version:
n8n Workflow Automation Tool
21 lines (20 loc) • 1.08 kB
TypeScript
import { ApiKey, ApiKeyRepository, User } from '@n8n/db';
import { EntityManager } from '@n8n/typeorm';
import { AuthStrategyRegistry } from '../../services/auth-strategy.registry';
import { JwtService } from '../../services/jwt.service';
import { UserWithContext } from '../../services/oauth-token-verifier-proxy.service';
export declare class McpServerApiKeyService {
private readonly apiKeyRepository;
private readonly jwtService;
private readonly authStrategyRegistry;
constructor(apiKeyRepository: ApiKeyRepository, jwtService: JwtService, authStrategyRegistry: AuthStrategyRegistry);
createMcpServerApiKey(user: User, trx?: EntityManager): Promise<ApiKey>;
findServerApiKeyForUser(user: User, { redact }?: {
redact?: boolean | undefined;
}): Promise<ApiKey | null>;
verifyApiKey(apiKey: string): Promise<UserWithContext>;
deleteAllMcpApiKeysForUser(user: User, trx?: EntityManager): Promise<void>;
private redactApiKey;
getOrCreateApiKey(user: User): Promise<ApiKey>;
rotateMcpServerApiKey(user: User): Promise<ApiKey>;
}