pub struct CodexOAuthCredentials {
pub access_token: String,
pub refresh_token: Option<String>,
pub account_id: Option<String>,
pub email: Option<String>,
}Expand description
Codex CLI OAuth credentials, loaded from disk.
Fields§
§access_token: String§refresh_token: Option<String>§account_id: Option<String>§email: Option<String>Account email decoded from the OAuth id_token, when present.
Implementations§
Source§impl CodexOAuthCredentials
impl CodexOAuthCredentials
Sourcepub fn default_path() -> Option<PathBuf>
pub fn default_path() -> Option<PathBuf>
Default path of the Codex CLI credentials ($CODEX_HOME or ~/.codex).
Sourcepub fn load_from_path(path: &Path) -> Result<Self, SpendPanelError>
pub fn load_from_path(path: &Path) -> Result<Self, SpendPanelError>
Loads and validates credentials from a file.
Sourcepub fn parse(raw: &str) -> Result<Self, SpendPanelError>
pub fn parse(raw: &str) -> Result<Self, SpendPanelError>
Parses the Codex CLI auth.json.
Trait Implementations§
Source§impl Clone for CodexOAuthCredentials
impl Clone for CodexOAuthCredentials
Source§impl Debug for CodexOAuthCredentials
impl Debug for CodexOAuthCredentials
Source§impl PartialEq for CodexOAuthCredentials
impl PartialEq for CodexOAuthCredentials
impl StructuralPartialEq for CodexOAuthCredentials
Auto Trait Implementations§
impl Freeze for CodexOAuthCredentials
impl RefUnwindSafe for CodexOAuthCredentials
impl Send for CodexOAuthCredentials
impl Sync for CodexOAuthCredentials
impl Unpin for CodexOAuthCredentials
impl UnsafeUnpin for CodexOAuthCredentials
impl UnwindSafe for CodexOAuthCredentials
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more