pub enum CredentialSource {
Show 14 variants
AuthModeNone,
KeylessRoute {
base_url: String,
},
CliOverride,
ProviderConfigApiKey {
table: String,
},
ProviderConfigEnv {
var: String,
},
AmbientEnv {
var: String,
},
SecretStore {
slot: String,
},
ExternalGrant {
cli: String,
path: String,
},
OAuth {
flow: String,
account: Option<String>,
},
UserGlobalConfig,
AccountSession,
ClaudeOrgLink,
SessionKey,
Missing {
probed: Vec<CredentialProbe>,
},
}Expand description
The place a credential was resolved from, or the fact that no place had one. This is the single value every readiness surface should render.
Variants§
AuthModeNone
auth_mode = "none": the route intentionally sends no credential.
KeylessRoute
A keyless self-hosted or loopback route.
CliOverride
--api-key on the command line (or the dispatcher’s source-marked
forward of it).
ProviderConfigApiKey
[providers.<table>] api_key.
ProviderConfigEnv
[providers.<table>] api_key_env = "<var>", resolved from <var>.
AmbientEnv
An ambient provider environment variable.
SecretStore
CodeWhale’s own durable secret store.
ExternalGrant
A read-only, explicitly consented credential file owned by another CLI.
OAuth
A subscription OAuth sign-in: Codewhale-owned storage, or (xAI) a
consented Grok CLI import. account is the display label (email,
plan) of the account it signs in as, taken from the same read that
proved the sign-in usable; never token material.
UserGlobalConfig
The user-global ~/.codewhale/config.toml, consulted last so a key
saved there survives loading a workspace config.
AccountSession
An expiring, process-only Codewhale account auth transform.
ClaudeOrgLink
SessionKey
Missing
Nothing had a credential. probed is in precedence order.
Fields
probed: Vec<CredentialProbe>Implementations§
Source§impl CredentialSource
impl CredentialSource
pub fn is_present(&self) -> bool
Sourcepub fn label(&self) -> Cow<'static, str>
pub fn label(&self) -> Cow<'static, str>
Short human-readable label, in pi’s spirit: the name of the place, not a sentence. Safe to render anywhere — never contains a secret.
Sourcepub fn probed(&self) -> &[CredentialProbe]
pub fn probed(&self) -> &[CredentialProbe]
The ordered places that were probed, for a failed resolution.
Trait Implementations§
Source§impl Clone for CredentialSource
impl Clone for CredentialSource
Source§impl Debug for CredentialSource
impl Debug for CredentialSource
impl Eq for CredentialSource
Source§impl PartialEq for CredentialSource
impl PartialEq for CredentialSource
impl StructuralPartialEq for CredentialSource
Auto Trait Implementations§
impl Forget for CredentialSource
impl Freeze for CredentialSource
impl Move for CredentialSource
impl RefUnwindSafe for CredentialSource
impl Send for CredentialSource
impl Sync for CredentialSource
impl Unpin for CredentialSource
impl UnsafeUnpin for CredentialSource
impl UnwindSafe for CredentialSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.