import { Logger } from '../../util/logging.js'; /** * Receives one OAuth authorization code on a loopback HTTP server. * * The server binds to `127.0.0.1` on an available port. It accepts the code * only when the returned state matches the generated state. This class is a * low-level part of interactive federation login. */ export declare class CallbackHandler { private _code; private _state; private _server; private _addr; private _codePromise; private _codePromiseResolve; private _codePromiseReject; private readonly logger?; /** Creates a new callback handler. */ constructor(logger?: Logger); /** Returns the OAuth state value. */ get state(): string; /** Returns the received authorization code. */ get code(): string | null; /** Returns the redirect URI after the server starts; throws before then. */ get addr(): string; /** Starts the local callback server. Call {@link waitForCode} to await the request. */ listenAndServe(): Promise; private _setCode; /** Stops the local callback server. */ shutdown(): Promise; /** Waits for a valid code and rejects when the optional timeout expires. */ waitForCode(timeoutMs: number | undefined): Promise; } //# sourceMappingURL=server.d.ts.map