Skip to main content

IdentityProvider

Trait IdentityProvider 

Source
pub trait IdentityProvider: Send + Sync {
    // Required methods
    fn identity_open<'life0, 'life1, 'async_trait>(
        &'life0 self,
        purpose: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn SigningIdentity>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resolve(&self, pubkey: &[u8; 32]) -> Subject;
}
Expand description

Unified identity provider — key management + trust resolution.

Implementations manage key storage, derivation, and peer trust. The Signer trait (used by RpcClientImpl) adapts over this.

Required Methods§

Source

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

Open a purpose-keyed signing identity.

Derives a unique Ed25519 keypair via HKDF(root_seed, purpose). Same purpose always produces the same keypair from the same root.

Source

fn resolve(&self, pubkey: &[u8; 32]) -> Subject

Resolve a peer’s verified pubkey to a subject (authorization identity).

Called after Ed25519 signature verification succeeds. Maps the cryptographically verified signer pubkey to a permission subject.

Implementors§