Skip to main content

CredentialRevocationStore

Trait CredentialRevocationStore 

Source
pub trait CredentialRevocationStore: Send + Sync {
    // Required methods
    fn revoke_credential<'life0, 'async_trait>(
        &'life0 self,
        id: CredentialId,
        expires_at: i64,
    ) -> Pin<Box<dyn Future<Output = Result<(), RevocationPublishError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_revoked_checked<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 CredentialId,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn is_revoked<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 CredentialId,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Trait for a credential-revocation store keyed by issuer-scoped CredentialId.

The Self::revoke_credential method encodes the mandatory publication-before-eviction ordering (v16 §3.3): the credential is published to the blocklist FIRST, so new verifications fail, and only THEN are derived handles evicted. Callers cannot reverse this order because publication and eviction are a single method call.

The methods are async because the canonical store is remote for every process except the policy service: checks and publications cross the RPC bus to the revocation authority.

Required Methods§

Source

fn revoke_credential<'life0, 'async_trait>( &'life0 self, id: CredentialId, expires_at: i64, ) -> Pin<Box<dyn Future<Output = Result<(), RevocationPublishError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Revoke a credential. expires_at is the token’s exp — the entry can be garbage-collected after this time.

Ordering: the credential is published (durable, for the authority store) BEFORE derived handles are evicted. This ensures new verifications fail the blocklist check while cached contexts derived from the revoked token are being removed.

Returns RevocationPublishError if the revocation authority did not durably accept the publication; on error no in-memory state changes and no handles are evicted.

Source

fn is_revoked_checked<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 CredentialId, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The checked revocation lookup — called by is_revoked after validation. Implementations provide the actual store lookup. Implementations fail closed: any lookup error returns true.

Provided Methods§

Source

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

Returns true if the given issuer-scoped credential has been revoked.

An invalid credential ID (empty issuer or value) returns true (fail-closed): per v16 §3.1, malformed identifiers deny.

Implementors§