Structs§
- Auth
Info - Stored authentication data
- Login
Session - In-flight OAuth session. Returned by
start_login(). The caller drives the flow: - User
Info
Enums§
- Poll
Outcome - Outcome of one
LoginSession::poll_oncecall.
Functions§
- auth_
file_ path - Get path to auth file
- authorize_
url - current_
user - Get current user info (if logged in)
- get_
stored_ auth - Get stored auth info
- get_
valid_ token - Get a valid access token, refreshing automatically if expired. Returns the access token string ready to use.
- is_
logged_ in - Check if user is logged in
- login
- Stdout-driven OAuth login: prints the URL, opens the browser,
polls
/auth/checkwith stdin-driven ESC cancel. Used by the CLI (atomcode login,atomcode codingplan) and bysetup.rs’sstep_loginwhen the TUI hasn’t already pre-flighted login. - logout
- Logout - clear stored auth.
- open_
browser - platform_
broker_ url - Platform server URLs (derived from
ATOMCODE_PLATFORM_SERVER). - platform_
check_ url - platform_
exchange_ url - platform_
login_ url - platform_
refresh_ url - platform_
token_ url - refresh_
access_ token - Refresh the access token using the stored refresh_token via Platform Broker. Returns updated AuthInfo with new tokens, and saves it to disk.
- save_
auth - Save auth info to file
- start_
login - Begin OAuth login: call
/auth/login, return a session containing the auth URL + state. Cheap (one HTTP round-trip), never blocks on user action — separated from polling so callers can render the URL before yielding control to the wait loop. - token_
url - user_
url