pub struct ClaudeCodeResolver { /* private fields */ }Expand description
Auto-discovers credentials from an existing Claude Code installation.
Searches the following locations (in order):
- macOS Keychain (
security find-generic-password -s "claude.ai" -w) ~/.claude/.credentials.json(claudeAiOauth.accessToken)
Checks expiresAt in the credentials file and rejects expired tokens
with a hint to run claude login.
This resolver does not support login/logout — Claude Code manages its own
credentials. Users must run claude login in Claude Code first.
Implementations§
Source§impl ClaudeCodeResolver
impl ClaudeCodeResolver
pub const fn new() -> Self
pub const fn with_enabled(enabled: bool) -> Self
Trait Implementations§
Source§impl Clone for ClaudeCodeResolver
impl Clone for ClaudeCodeResolver
Source§fn clone(&self) -> ClaudeCodeResolver
fn clone(&self) -> ClaudeCodeResolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CredentialResolver for ClaudeCodeResolver
impl CredentialResolver for ClaudeCodeResolver
Source§fn id(&self) -> &str
fn id(&self) -> &str
Unique identifier for this resolver (e.g.
"env", "codineer-oauth", "claude-code").Source§fn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable name shown in UI (e.g.
"Environment Variables").Source§fn resolve(&self) -> Result<Option<ResolvedCredential>, CredentialError>
fn resolve(&self) -> Result<Option<ResolvedCredential>, CredentialError>
Attempt to resolve credentials. Returns
Ok(None) if this source
has no credentials (and the chain should try the next resolver).Source§fn supports_login(&self) -> bool
fn supports_login(&self) -> bool
Whether this resolver supports interactive
login().Source§impl Debug for ClaudeCodeResolver
impl Debug for ClaudeCodeResolver
Auto Trait Implementations§
impl Freeze for ClaudeCodeResolver
impl RefUnwindSafe for ClaudeCodeResolver
impl Send for ClaudeCodeResolver
impl Sync for ClaudeCodeResolver
impl Unpin for ClaudeCodeResolver
impl UnsafeUnpin for ClaudeCodeResolver
impl UnwindSafe for ClaudeCodeResolver
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