pub struct RuntimeAuthLeaseHandle { /* private fields */ }Expand description
Runtime-backed AuthLeaseHandle impl.
Holds a mutex-guarded registry of per-binding auth_dsl::AuthMachineAuthority
instances. Lookup-or-insert happens on first acquire_lease; release is
also allowed before acquire so token-clear surfaces remain idempotent after
process restart.
Implementations§
Source§impl RuntimeAuthLeaseHandle
impl RuntimeAuthLeaseHandle
Trait Implementations§
Source§impl AuthLeaseHandle for RuntimeAuthLeaseHandle
impl AuthLeaseHandle for RuntimeAuthLeaseHandle
Source§fn acquire_lease(
&self,
lease_key: &LeaseKey,
expires_at: u64,
) -> Result<AuthLeaseTransition, DslTransitionError>
fn acquire_lease( &self, lease_key: &LeaseKey, expires_at: u64, ) -> Result<AuthLeaseTransition, DslTransitionError>
Fire
AcquireAuthLease { lease_key, expires_at } — unconditional. Read moreSource§fn mark_expiring(&self, lease_key: &LeaseKey) -> Result<(), DslTransitionError>
fn mark_expiring(&self, lease_key: &LeaseKey) -> Result<(), DslTransitionError>
Fire
MarkAuthExpiring { lease_key } — only legal from valid.Source§fn begin_refresh(&self, lease_key: &LeaseKey) -> Result<(), DslTransitionError>
fn begin_refresh(&self, lease_key: &LeaseKey) -> Result<(), DslTransitionError>
Source§fn complete_refresh(
&self,
lease_key: &LeaseKey,
new_expires_at: u64,
now: u64,
) -> Result<AuthLeaseTransition, DslTransitionError>
fn complete_refresh( &self, lease_key: &LeaseKey, new_expires_at: u64, now: u64, ) -> Result<AuthLeaseTransition, DslTransitionError>
Fire
CompleteAuthRefresh { lease_key, new_expires_at, now } — only
legal from refreshing. Returns the generation assigned by the accepted
transition.Source§fn refresh_failed(
&self,
lease_key: &LeaseKey,
permanent: bool,
) -> Result<(), DslTransitionError>
fn refresh_failed( &self, lease_key: &LeaseKey, permanent: bool, ) -> Result<(), DslTransitionError>
Fire
AuthRefreshFailed { lease_key, permanent } — only legal from
refreshing. permanent=true routes to reauth_required and emits a
reauth notice; permanent=false routes back to expiring.Source§fn mark_reauth_required(
&self,
lease_key: &LeaseKey,
) -> Result<(), DslTransitionError>
fn mark_reauth_required( &self, lease_key: &LeaseKey, ) -> Result<(), DslTransitionError>
Fire
MarkReauthRequired { lease_key } — any known state → reauth.Source§fn release_lease(&self, lease_key: &LeaseKey) -> Result<(), DslTransitionError>
fn release_lease(&self, lease_key: &LeaseKey) -> Result<(), DslTransitionError>
Fire
ReleaseAuthLease { lease_key } — removes the binding from all
sets and the expiry map.Source§fn release_credential_lifecycle(
&self,
lease_key: &LeaseKey,
) -> Result<(), DslTransitionError>
fn release_credential_lifecycle( &self, lease_key: &LeaseKey, ) -> Result<(), DslTransitionError>
Clear credential lifecycle authority without treating persisted token
bytes as a new lease source. Read more
Source§fn restore_auth_lifecycle_snapshot(
&self,
lease_key: &LeaseKey,
snapshot: &AuthLeaseSnapshot,
expires_at: Option<u64>,
) -> Result<(), DslTransitionError>
fn restore_auth_lifecycle_snapshot( &self, lease_key: &LeaseKey, snapshot: &AuthLeaseSnapshot, expires_at: Option<u64>, ) -> Result<(), DslTransitionError>
Restore a captured lifecycle snapshot after a later durable write failed. Read more
Source§fn snapshot(&self, lease_key: &LeaseKey) -> AuthLeaseSnapshot
fn snapshot(&self, lease_key: &LeaseKey) -> AuthLeaseSnapshot
Observe the current DSL-level state of a binding.
Source§impl Clone for RuntimeAuthLeaseHandle
impl Clone for RuntimeAuthLeaseHandle
Source§fn clone(&self) -> RuntimeAuthLeaseHandle
fn clone(&self) -> RuntimeAuthLeaseHandle
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 RuntimeAuthLeaseHandle
impl Debug for RuntimeAuthLeaseHandle
Source§impl Default for RuntimeAuthLeaseHandle
impl Default for RuntimeAuthLeaseHandle
Source§impl OAuthDevicePollLifecycle for RuntimeAuthLeaseHandle
impl OAuthDevicePollLifecycle for RuntimeAuthLeaseHandle
fn device_flow_state_is_authmachine_owned(&self) -> bool
fn finish_device_poll( &self, target: &AuthBindingRef, device_code: &str, ) -> Result<(), OAuthFlowError>
fn consume_device_flow( &self, target: &AuthBindingRef, device_code: &str, provider: OAuthProviderIdentity, ) -> Result<(), OAuthFlowError>
fn expire_device_flow( &self, target: &AuthBindingRef, device_code: &str, ) -> Result<(), OAuthFlowError>
fn restore_device_flow( &self, record: &OAuthDeviceFlowRecord, ) -> Result<(), OAuthFlowError>
fn device_flow_payloads_changed(&self) -> Result<(), OAuthFlowError>
fn device_flow_payload_removed( &self, _record: &OAuthDeviceFlowRecord, ) -> Result<(), OAuthFlowError>
Auto Trait Implementations§
impl Freeze for RuntimeAuthLeaseHandle
impl RefUnwindSafe for RuntimeAuthLeaseHandle
impl Send for RuntimeAuthLeaseHandle
impl Sync for RuntimeAuthLeaseHandle
impl Unpin for RuntimeAuthLeaseHandle
impl UnsafeUnpin for RuntimeAuthLeaseHandle
impl UnwindSafe for RuntimeAuthLeaseHandle
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