Skip to main content

CredentialFetcher

Trait CredentialFetcher 

Source
pub trait CredentialFetcher {
    // Required methods
    fn fetch(
        &mut self,
        info: &str,
        at: i64,
    ) -> Result<VerificationCredential, CredentialError>;
    fn authorizes(
        &self,
        credential: &VerificationCredential,
        origin: &CanonicalIdentity,
    ) -> bool;
}
Expand description

Caller-supplied info URI acquisition and authority policy.

Required Methods§

Source

fn fetch( &mut self, info: &str, at: i64, ) -> Result<VerificationCredential, CredentialError>

Acquire and validate the credential named by the exact info URI at caller-supplied time.

at lets bounded caches discard an expired key without reading a clock themselves.

Source

fn authorizes( &self, credential: &VerificationCredential, origin: &CanonicalIdentity, ) -> bool

Whether this credential is trusted and authoritative for origin.

Implementors§