services/auth_service library

Classes

AuthLoginResult
What the command needs after a successful password login: what to save to ~/.appflight/credentials.json and what to print. Saving is the command's job — this service stays free of filesystem state.
AuthService
Password login + server-side revoking logout, against contracts already live on the backend (/v1/auth/api-keys, /v1/auth/whoami) and the Identity Toolkit REST API (AuthRestClient). Every Dio is constructor/call-injected so tests can swap in a fake adapter (test/helpers/fake_adapter.dart) — this service never terminates the process; every failure is a thrown AuthCliFault, and the command decides the exit code and the printed line.