Skip to main content

RefreshSessionStore

Trait RefreshSessionStore 

Source
pub trait RefreshSessionStore: Send + Sync {
    type Error: Send;

    // Required methods
    fn rotate_refresh<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 RefreshRotationRequest,
    ) -> Pin<Box<dyn Future<Output = Result<RefreshStoreOutcome, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resolve_conflict<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 RefreshRotationRequest,
    ) -> Pin<Box<dyn Future<Output = Result<RefreshRejection, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Product persistence boundary. Forge never opens a database transaction or maps product errors.

Required Associated Types§

Source

type Error: Send

Product error preserved through the coordinator, including database/audit/commit failures.

Required Methods§

Source

fn rotate_refresh<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 RefreshRotationRequest, ) -> Pin<Box<dyn Future<Output = Result<RefreshStoreOutcome, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Checks current account/version/restriction state and applies a conditional JTI rotation or rejection. Reuse classification, version bump, session purge and required security audit must use the same transaction. Refresh request.now from the product’s trusted clock after acquiring database locks, so waiting cannot extend the verified credential deadline. Authentication rejection is an Ok(Rejected(..)), so it cannot accidentally roll back already-required revocation.

§Errors

Returns the original product error if any required operation or transaction commit fails.

Source

fn resolve_conflict<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 RefreshRotationRequest, ) -> Pin<Box<dyn Future<Output = Result<RefreshRejection, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolves a lost CAS in a fresh writer transaction after the winner becomes visible. Recheck account/version/session state, classify, and atomically revoke on reuse. This method may only reject; it must never rotate or release the losing request’s candidate credentials.

§Errors

Returns the product’s database, audit, or commit error without claiming security success.

Implementors§