pub struct OAuthSession {
pub access_token: String,
pub refresh_token: String,
pub expires_at_ms: i64,
pub persist_path: Option<PathBuf>,
}Expand description
Credential set backing one subscription session.
Fields§
§access_token: StringCurrent bearer token.
refresh_token: StringLong-lived token used to mint new bearer tokens; empty for static
(env) tokens, which are never refreshed.
expires_at_ms: i64Bearer expiry as unix millis; i64::MAX for non-expiring static tokens.
persist_path: Option<PathBuf>Our credentials file to rewrite after refresh; None means never
persist (env tokens and Claude Code’s own file).
Trait Implementations§
Auto Trait Implementations§
impl Forget for OAuthSession
impl Freeze for OAuthSession
impl RefUnwindSafe for OAuthSession
impl Send for OAuthSession
impl Sync for OAuthSession
impl Unpin for OAuthSession
impl UnsafeUnpin for OAuthSession
impl UnwindSafe for OAuthSession
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