pub struct CompositeEpochRevocation { /* private fields */ }Expand description
Composes a best-effort Cache and an authoritative Fetcher
into the engine’s EpochRevocation port.
Promoted to the SDK in Phase 11.Z from chat-auth’s
epoch_adapter::ChatAuthEpochRevocation (§3 Row 6 “replace, don’t
layer”). All consumers wire this shape — only their Cache +
Fetcher impl identities differ:
| Consumer | Cache | Fetcher |
|---|---|---|
| chat-api | super::SharedCacheCache (sv:{sub}) | Cross-schema SQL (scaccounts.ppnums) |
| RCW | super::SharedCacheCache (sv:{sub}) | (Slice 3 deferred — RFC_2026-05-08 §4.4) |
| CTW | super::SharedCacheCache (sv:{sub}) | (Slice 4 deferred — RFC_2026-05-08 §4.4) |
§Algorithm — preserved from chat-auth’s pre-promotion shape
cache.get(sv:{sub})— hit short-circuits.- Miss →
fetcher.fetch(sub)(authoritative read). - Fetcher Ok →
cache.set(sv:{sub}, value, SV_CACHE_TTL)(best-effort write-back; failures swallowed perCache::setcontract). - Fetcher Err →
EpochRevocationError::Transient(fail-closed).
The engine’s check_epoch::run then maps:
Ok(c)andtoken.sv >= c→ admitOk(c)andtoken.sv < c→AuthError::SessionVersionStaleErr(Transient)→AuthError::SessionVersionLookupUnavailable
The SDK then maps those to typed
crate::TokenVerifyError::SessionVersionStale /
crate::TokenVerifyError::SessionVersionLookupUnavailable.
Implementations§
Trait Implementations§
Source§impl Debug for CompositeEpochRevocation
impl Debug for CompositeEpochRevocation
Auto Trait Implementations§
impl !RefUnwindSafe for CompositeEpochRevocation
impl !UnwindSafe for CompositeEpochRevocation
impl Freeze for CompositeEpochRevocation
impl Send for CompositeEpochRevocation
impl Sync for CompositeEpochRevocation
impl Unpin for CompositeEpochRevocation
impl UnsafeUnpin for CompositeEpochRevocation
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