pub struct AuthBindings {
pub provider: String,
pub profile: String,
pub account_id: String,
pub credential_identity_hash: String,
pub scopes: BTreeSet<String>,
pub token_status: TokenStatus,
pub refresh_available: bool,
pub observed_at: DateTime<Utc>,
}Expand description
Secret-free identity and token-state binding for one provider account.
The credential_identity_hash is a digest over the public credential
identity (for example keyring:primary or env:OPENAI_API_KEY), never the
secret value. It is stable under secret rotation but changes when the
credential identity or provider/profile changes, matching the existing
routing authority binding.
Fields§
§provider: StringProvider adapter name.
profile: StringProvider profile name.
account_id: StringPublic provider account identifier.
credential_identity_hash: StringSecret-free digest of the credential identity.
scopes: BTreeSet<String>Canonically ordered granted scopes.
token_status: TokenStatusResolved token lifecycle state.
refresh_available: boolWhether a refresh token is present and can be used.
observed_at: DateTime<Utc>When the binding was produced.
Implementations§
Source§impl AuthBindings
impl AuthBindings
Sourcepub fn new(
provider: impl Into<String>,
profile: impl Into<String>,
account_id: impl Into<String>,
credential_identity_hash: impl Into<String>,
scopes: BTreeSet<String>,
token_status: TokenStatus,
refresh_available: bool,
observed_at: DateTime<Utc>,
) -> Result<Self, AuthError>
pub fn new( provider: impl Into<String>, profile: impl Into<String>, account_id: impl Into<String>, credential_identity_hash: impl Into<String>, scopes: BTreeSet<String>, token_status: TokenStatus, refresh_available: bool, observed_at: DateTime<Utc>, ) -> Result<Self, AuthError>
Builds a binding after validating every material field.
Trait Implementations§
Source§impl Clone for AuthBindings
impl Clone for AuthBindings
Source§fn clone(&self) -> AuthBindings
fn clone(&self) -> AuthBindings
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 AuthBindings
impl Debug for AuthBindings
Source§impl<'de> Deserialize<'de> for AuthBindings
impl<'de> Deserialize<'de> for AuthBindings
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
impl Eq for AuthBindings
Source§impl PartialEq for AuthBindings
impl PartialEq for AuthBindings
Source§impl Serialize for AuthBindings
impl Serialize for AuthBindings
impl StructuralPartialEq for AuthBindings
Auto Trait Implementations§
impl Freeze for AuthBindings
impl RefUnwindSafe for AuthBindings
impl Send for AuthBindings
impl Sync for AuthBindings
impl Unpin for AuthBindings
impl UnsafeUnpin for AuthBindings
impl UnwindSafe for AuthBindings
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