import type { AuthProvider, AuthUser } from './types.js'; import { type Logger } from './logger.js'; export interface NodeAuthConfig { /** Path to store credentials (default: ~/.config/rool/credentials.json) */ credentialsPath?: string; /** Timeout for login flow in ms (default: 5 minutes) */ loginTimeoutMs?: number; onAuthStateChanged?: (authenticated: boolean) => void; } export declare class NodeAuthProvider implements AuthProvider { private config; private _authUrl; private logger; constructor(config?: NodeAuthConfig); /** Called by AuthManager to inject the auth URL */ setAuthUrl(url: string): void; /** Called by AuthManager to inject the logger */ setLogger(logger: Logger): void; /** * Get a short hash of the auth URL for scoping credentials by endpoint. */ private get endpointHash(); private get credentialsPath(); /** * Get the auth endpoint URL (without trailing slash). */ private get authEndpoint(); initialize(): boolean; getTokens(): Promise<{ accessToken: string; roolToken: string; } | undefined>; getAuthUser(): AuthUser; isAuthenticated(): Promise; login(appName: string, params?: Record): Promise; signup(appName: string, params?: Record): Promise; private authFlow; logout(): void; private readCredentials; private writeCredentials; private refreshToken; private startLoopbackServer; } //# sourceMappingURL=auth-node.d.ts.map