Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts struct {
FS fsutil.FileSystem
}
Accounts implements provider.AccountManager for Codex.
func (*Accounts) ProviderID ¶
func (*Accounts) Switch ¶
Switch sets the active Codex account by copying the matching account's auth file to ~/.codex/auth.json and updating codex-auth's registry. Before overwriting, it adopts the current auth.json into ~/.codex/accounts/ if it's not already stored there (preserves accounts created by codex login).
type CodexAccount ¶
type CodexAccount struct {
AccessToken string
IDToken string
AccountID string // from tokens.account_id
UserID string // from JWT chatgpt_user_id
Email string // from JWT id_token
PlanType string // from JWT id_token
RecordKey string // "{user_id}::{account_id}" — codex-auth compat
FilePath string // source file path
IsActive bool // true if from ~/.codex/auth.json
}
CodexAccount holds parsed credentials from a Codex auth.json file.
func DiscoverAccounts ¶
func DiscoverAccounts(fs fsutil.FileSystem) []CodexAccount
DiscoverAccounts finds all Codex accounts from: 1. ~/.codex/auth.json (active account) 2. ~/.codex/accounts/*.auth.json (additional accounts, codex-auth interop)
Click to show internal directories.
Click to hide internal directories.