#[non_exhaustive]pub struct ClaudeCodeOAuthConfig {
pub token_url: String,
pub client_id: Option<String>,
pub refresh_timeout: Duration,
}Expand description
Configuration for super::ClaudeCodeOAuthProvider.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.token_url: StringOAuth2 token endpoint URL. Defaults to
DEFAULT_TOKEN_URL.
client_id: Option<String>Optional OAuth client id sent with the refresh_token
grant. The claude CLI omits this; supply a value only
if your refresh-token policy requires one.
refresh_timeout: DurationHTTP timeout applied to refresh requests.
Implementations§
Source§impl ClaudeCodeOAuthConfig
impl ClaudeCodeOAuthConfig
Sourcepub fn with_token_url(self, url: impl Into<String>) -> Self
pub fn with_token_url(self, url: impl Into<String>) -> Self
Override the token endpoint URL — useful for staging environments or test mocks.
Sourcepub fn with_client_id(self, client_id: impl Into<String>) -> Self
pub fn with_client_id(self, client_id: impl Into<String>) -> Self
Set the OAuth client id sent with the refresh grant.
Sourcepub const fn with_refresh_timeout(self, timeout: Duration) -> Self
pub const fn with_refresh_timeout(self, timeout: Duration) -> Self
Override the refresh-call HTTP timeout.
Trait Implementations§
Source§impl Clone for ClaudeCodeOAuthConfig
impl Clone for ClaudeCodeOAuthConfig
Source§fn clone(&self) -> ClaudeCodeOAuthConfig
fn clone(&self) -> ClaudeCodeOAuthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClaudeCodeOAuthConfig
impl Debug for ClaudeCodeOAuthConfig
Auto Trait Implementations§
impl Freeze for ClaudeCodeOAuthConfig
impl RefUnwindSafe for ClaudeCodeOAuthConfig
impl Send for ClaudeCodeOAuthConfig
impl Sync for ClaudeCodeOAuthConfig
impl Unpin for ClaudeCodeOAuthConfig
impl UnsafeUnpin for ClaudeCodeOAuthConfig
impl UnwindSafe for ClaudeCodeOAuthConfig
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