import type { OAuthRegisteredClientsStore } from "@modelcontextprotocol/sdk/server/auth/clients.js"; import type { OAuthClientInformationFull } from "@modelcontextprotocol/sdk/shared/auth.js"; export interface StoredAuthorizationCode { codeHash: string; clientId: string; redirectUri: string; codeChallenge: string; scopes: string[]; resource: string; createdAt: number; expiresAt: number; consumedAt?: number; /** * EVO-12 P2 (mode 3, multi-tenant): the upstream 39-auth subject this code was * minted for. Threaded code→token so /mcp can serve the per-user root. Absent * for single-tenant (consent-secret) codes. */ sub?: string; } export interface StoredToken { tokenHash: string; tokenType: "access" | "refresh"; clientId: string; scopes: string[]; resource: string; issuedAt: number; expiresAt: number; revokedAt?: number; parentRefreshTokenHash?: string; /** EVO-12 P2: the 39-auth subject (see StoredAuthorizationCode.sub). */ sub?: string; } export declare class FileOAuthStore implements OAuthRegisteredClientsStore { readonly path: string; private snapshot; constructor(path: string); load(): Promise; getClient(clientId: string): Promise; registerClient(client: OAuthClientInformationFull): Promise; putAuthorizationCode(code: string, record: Omit): Promise; getAuthorizationCode(code: string, nowSeconds: number): Promise; consumeAuthorizationCode(code: string, nowSeconds: number): Promise; putToken(token: string, record: Omit): Promise; findToken(token: string): Promise; revokeToken(token: string, nowSeconds: number): Promise; private persist; } //# sourceMappingURL=file-store.d.ts.map