Trait DelegationRevocationStore

Source
pub trait DelegationRevocationStore: Send + Sync {
    // Required methods
    fn revoke<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token_id: &'life1 str,
        retain_until_unix: i64,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn is_revoked<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token_id: &'life1 str,
        now_unix: i64,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Durable revocation-state port for delegated grants.

Implementations must share state across every verifier that accepts the token, retain revocations until retain_until_unix, and fail closed on storage errors. This async port allows Redis or database adapters to avoid blocking runtime workers. It does not provide storage itself.

Required Methods§

Source

fn revoke<'life0, 'life1, 'async_trait>( &'life0 self, token_id: &'life1 str, retain_until_unix: i64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a token id revoked until its signature can no longer be accepted.

Source

fn is_revoked<'life0, 'life1, 'async_trait>( &'life0 self, token_id: &'life1 str, now_unix: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check revocation state. Implementations may discard entries whose retention deadline is at or before now_unix.

Implementors§