pub struct CodineerOAuthResolver { /* private fields */ }Expand description
Resolves credentials from Codineer’s saved OAuth tokens.
Loads tokens from the OS keyring or ~/.codineer/credentials.json.
If the token is expired and a refresh callback is available, attempts refresh.
Implementations§
Source§impl CodineerOAuthResolver
impl CodineerOAuthResolver
pub fn new(oauth_config: Option<OAuthConfig>) -> Self
Sourcepub fn with_refresh_fn(self, f: RefreshFn) -> Self
pub fn with_refresh_fn(self, f: RefreshFn) -> Self
Set the callback used to refresh expired tokens.
Sourcepub fn with_login_fn(self, f: LoginFn) -> Self
pub fn with_login_fn(self, f: LoginFn) -> Self
Set the callback used for interactive login.
Trait Implementations§
Source§impl CredentialResolver for CodineerOAuthResolver
impl CredentialResolver for CodineerOAuthResolver
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().Auto Trait Implementations§
impl Freeze for CodineerOAuthResolver
impl !RefUnwindSafe for CodineerOAuthResolver
impl Send for CodineerOAuthResolver
impl Sync for CodineerOAuthResolver
impl Unpin for CodineerOAuthResolver
impl UnsafeUnpin for CodineerOAuthResolver
impl !UnwindSafe for CodineerOAuthResolver
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