pub enum CredentialKind {
Bearer,
Cookie,
OauthAccess,
OauthRefresh,
OidcId,
AwsSts,
Macaroon,
Other {
name: CredentialKindName,
},
}Expand description
What kind of credential this is. Tags storage decisions and drives the
selection filter (AUTHZ-CRED-CLI-3). Closed for v1 — third crates
cannot extend the enum; backends with bespoke schemes use the
CredentialKind::Other escape valve.
The cost of going Other is loss of generic client integration — a method
requiring Bearer will not auto-attach an Other-kinded credential.
Variants§
Bearer
Static or short-lived bearer token (JWT, opaque token).
Cookie
Cookie-shaped session credential (server may issue Set-Cookie).
OauthAccess
OAuth/OIDC access token (paired with refresh; refresh_via populated).
OauthRefresh
OAuth/OIDC refresh token. Long-lived, used to mint new
CredentialKind::OauthAccess credentials.
OidcId
OIDC ID token (informational identity assertion; not for auth).
AwsSts
AWS STS credential set (composite: access_key_id + secret + token + exp).
Macaroon
Macaroon-style capability token with caveats.
Other
Custom kind, for backends with bespoke schemes; stored opaquely.
Fields
name: CredentialKindNameOpaque name supplied by the backend.
Trait Implementations§
Source§impl Clone for CredentialKind
impl Clone for CredentialKind
Source§fn clone(&self) -> CredentialKind
fn clone(&self) -> CredentialKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CredentialKind
impl Debug for CredentialKind
Source§impl<'de> Deserialize<'de> for CredentialKind
impl<'de> Deserialize<'de> for CredentialKind
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>,
Source§impl Hash for CredentialKind
impl Hash for CredentialKind
Source§impl JsonSchema for CredentialKind
impl JsonSchema for CredentialKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for CredentialKind
impl PartialEq for CredentialKind
Source§fn eq(&self, other: &CredentialKind) -> bool
fn eq(&self, other: &CredentialKind) -> bool
self and other values to be equal, and is used by ==.