pub struct LocalIdentityService { /* private fields */ }Expand description
Concrete IdentityPort backed by a local KeyStore.
Signs passports in-process using Ed25519 keys from the store and verifies
JWS signatures against the issuer’s published DID document. Holds the store
behind an Arc so one store can be shared with the did:web document endpoint
— signing and the published key are then guaranteed identical, and there is
no network-reachable signing endpoint to attack.
Implementations§
Trait Implementations§
Source§impl IdentityPort for LocalIdentityService
impl IdentityPort for LocalIdentityService
Source§fn sign_passport<'life0, 'life1, 'async_trait>(
&'life0 self,
passport_id: PassportId,
payload: &'life1 Value,
) -> Pin<Box<dyn Future<Output = Result<SignedCredential, DppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_passport<'life0, 'life1, 'async_trait>(
&'life0 self,
passport_id: PassportId,
payload: &'life1 Value,
) -> Pin<Box<dyn Future<Output = Result<SignedCredential, DppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sign the canonical JSON payload for a passport, returning a compact JWS.
Source§fn verify_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
jws: &'life1 str,
payload: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<bool, DppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
jws: &'life1 str,
payload: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<bool, DppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify a JWS signature against the issuer’s published DID document.
Auto Trait Implementations§
impl Freeze for LocalIdentityService
impl RefUnwindSafe for LocalIdentityService
impl Send for LocalIdentityService
impl Sync for LocalIdentityService
impl Unpin for LocalIdentityService
impl UnsafeUnpin for LocalIdentityService
impl UnwindSafe for LocalIdentityService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more