Skip to main content

RevocationStore

Trait RevocationStore 

Source
pub trait RevocationStore: Send + Sync {
    // Required methods
    fn revoke<'life0, 'life1, 'async_trait>(
        &'life0 self,
        delegation_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DelegationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn is_revoked<'life0, 'life1, 'async_trait>(
        &'life0 self,
        delegation_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, DelegationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn revoke_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ids: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = Result<(), DelegationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Pluggable storage backend for tracking revoked delegation IDs.

Implementations may use in-memory storage, databases, or distributed caches. All operations are async to accommodate network-backed stores.

This trait complements crate::revocation::RevocationRegistry by providing an async, error-aware interface suitable for production persistence backends.

Required Methods§

Source

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

Mark a delegation as revoked.

Revoking an already-revoked delegation is idempotent and does not return an error.

Source

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

Check whether a delegation has been revoked.

Source

fn revoke_batch<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<(), DelegationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Revoke multiple delegations at once (batch/cascade revocation).

This is typically used after cascade revocation computes the full set of transitively affected delegation IDs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§