import { authorize } from "../oauth/authorize"; import { discoverSSOConfig } from "../oauth/discoverSSOConfig"; import { type TokenStore } from "../oauth/tokenStore"; import type { CommonArgs } from "../cli/commonArgs"; import type { CommandDeps } from "../cli/types"; /** Verb-specific deps for `axe-auth login`. */ export interface LoginDeps extends CommandDeps { /** Whether to treat the session as interactive. Defaults to `stdin.isTTY`. */ isInteractive?: boolean; /** Override `authorize` (for tests). */ authorize?: typeof authorize; /** Override the SSO discovery helper (for tests). */ discoverSSOConfig?: typeof discoverSSOConfig; /** * Override the token store. Defaults to a fresh * `KeyringTokenStore()`. The same instance is passed to `authorize` * so the pre-check and post-flow save agree on the keychain entry. */ tokenStore?: TokenStore; /** Override the confirmation prompt (for tests). */ confirm?: (prompt: string) => Promise; } /** Verb-specific flags for `axe-auth login`. */ export interface LoginFlags { /** Set by `--force`. Skip the "already authenticated" prompt. */ force?: boolean; } /** `axe-auth login` — drive the OAuth flow and persist tokens. */ declare const loginCommand: { name: string; summary: string; helpText: string; options: { force: { type: "boolean"; }; }; requiresConfig: true; run(args: CommonArgs & LoginFlags, deps: LoginDeps): Promise; }; export default loginCommand;