export interface OAuthCallbackResult { code?: string; error?: string; state?: string; } export interface OAuthServerOptions { startPort?: number; endPort?: number; timeout?: number; } /** * Starts a temporary HTTP server to capture OAuth callbacks * Automatically finds an available port in the specified range */ export declare class OAuthServer { private server; private port; private callbackPromise; private callbackResolve; private connections; /** * Start the OAuth callback server * Returns the port number it's listening on */ start(options?: OAuthServerOptions): Promise; /** * Wait for the OAuth callback * Automatically stops the server after receiving the callback */ waitForCallback(): Promise; /** * Stop the server */ stop(): Promise; /** * Get the current port (null if not started) */ getPort(): number | null; /** * Try to start server on a specific port */ private tryStartServer; /** * Handle incoming HTTP requests */ private handleRequest; /** * Send HTTP response with HTML page */ private sendResponse; /** * Escape HTML to prevent XSS */ private escapeHtml; } //# sourceMappingURL=oauthServer.d.ts.map