diff --git a/apub-reqwest/src/lib.rs b/apub-reqwest/src/lib.rs index 00dfd71..5fdef62 100644 --- a/apub-reqwest/src/lib.rs +++ b/apub-reqwest/src/lib.rs @@ -3,10 +3,10 @@ #![deny(missing_docs)] use apub_core::{ deliver::Deliver, - repo::{Dereference, Repo}, digest::{Digest, DigestBuilder, DigestFactory}, + repo::{Dereference, Repo}, session::{Session, SessionError}, - signature::{Sign, SignFactory}, + signature::{PrivateKey, Sign}, }; use http_signature_normalization_reqwest::{ digest::{DigestCreate, SignExt}, @@ -88,7 +88,7 @@ pub enum ReqwestError { SignatureError(#[from] SignatureError), } -type SignTraitError = <::Signer as Sign>::Error; +type SignTraitError = <::Signer as Sign>::Error; struct DigestWrapper(D); @@ -105,7 +105,7 @@ where impl ReqwestClient where - Crypto: SignFactory, + Crypto: PrivateKey, { /// Create a new Client & Repo implementation backed by the reqwest client pub fn new(client: Client, config: SignatureConfig, crypto: Crypto) -> Self { @@ -143,8 +143,7 @@ where #[async_trait::async_trait(?Send)] impl Repo for ReqwestClient where - Crypto: SignFactory + Send + Sync, - ::KeyId: Send, + Crypto: PrivateKey + Send + Sync, { type Error = ReqwestError>; @@ -160,8 +159,7 @@ where #[async_trait::async_trait(?Send)] impl Deliver for ReqwestClient where - Crypto: DigestFactory + SignFactory + Send + Sync, - ::KeyId: Send, + Crypto: DigestFactory + PrivateKey + Send + Sync, ::Digest: DigestBuilder + Clone, { type Error = ReqwestError>;