pub struct AuthStatus {
pub logged_in: bool,
pub auth_method: Option<String>,
pub api_provider: Option<String>,
pub email: Option<String>,
pub org_id: Option<String>,
pub org_name: Option<String>,
pub subscription_type: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
Authentication status returned by claude auth status --json.
§Example
let claude = claude_wrapper::Claude::builder().build()?;
let status = claude_wrapper::AuthStatusCommand::new()
.execute_json(&claude).await?;
if status.logged_in {
println!("Logged in as {}", status.email.unwrap_or_default());
}Fields§
§logged_in: boolWhether the user is currently logged in.
auth_method: Option<String>Authentication method (e.g. “claude.ai”).
api_provider: Option<String>API provider (e.g. “firstParty”).
email: Option<String>Authenticated user’s email address.
org_id: Option<String>Organization ID.
org_name: Option<String>Organization name.
subscription_type: Option<String>Subscription type (e.g. “pro”, “max”).
extra: HashMap<String, Value>Any additional fields not explicitly modeled.
Trait Implementations§
Source§impl Clone for AuthStatus
impl Clone for AuthStatus
Source§fn clone(&self) -> AuthStatus
fn clone(&self) -> AuthStatus
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 Debug for AuthStatus
impl Debug for AuthStatus
Source§impl<'de> Deserialize<'de> for AuthStatus
impl<'de> Deserialize<'de> for AuthStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuthStatus
impl RefUnwindSafe for AuthStatus
impl Send for AuthStatus
impl Sync for AuthStatus
impl Unpin for AuthStatus
impl UnsafeUnpin for AuthStatus
impl UnwindSafe for AuthStatus
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