chore: make CodexAuth::api_key a private field (#1965)

Force callers to access this information via `get_token()` rather than
messing with it directly.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/1965).
* #1971
* #1970
* #1966
* __->__ #1965
* #1962
This commit is contained in:
Michael Bolin
2025-08-07 16:40:01 -07:00
committed by GitHub
parent db76f32888
commit 02c9c2ecad
2 changed files with 11 additions and 8 deletions

View File

@@ -38,8 +38,9 @@ pub enum AuthMode {
#[derive(Debug, Clone)]
pub struct CodexAuth {
pub api_key: Option<String>,
pub mode: AuthMode,
api_key: Option<String>,
auth_dot_json: Arc<Mutex<Option<AuthDotJson>>>,
auth_file: PathBuf,
}