From abb8e2b7ac05960b9c7c52f427af50494c1bbec3 Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Thu, 18 Nov 2021 16:09:25 -0600 Subject: [PATCH] reqwest-example: don't import signatures --- examples/reqwest-example/Cargo.toml | 2 -- examples/reqwest-example/src/main.rs | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/reqwest-example/Cargo.toml b/examples/reqwest-example/Cargo.toml index 64b5833..cce783f 100644 --- a/examples/reqwest-example/Cargo.toml +++ b/examples/reqwest-example/Cargo.toml @@ -11,8 +11,6 @@ apub-core = { version = "0.1.0", path = "../../apub-core/" } apub-reqwest = { version = "0.1.0", path = "../../apub-reqwest/" } apub-openssl = { version = "0.1.0", path = "../../apub-openssl/" } example-types = { version = "0.1.0", path = "../example-types/" } -http-signature-normalization-reqwest = "0.2.0" openssl = "0.10.13" reqwest = "0.11.6" -serde = { version = "1", features = ["derive"] } tokio = { version = "1.14.0", features = ["full"] } diff --git a/examples/reqwest-example/src/main.rs b/examples/reqwest-example/src/main.rs index cad284c..2596ee0 100644 --- a/examples/reqwest-example/src/main.rs +++ b/examples/reqwest-example/src/main.rs @@ -1,9 +1,8 @@ use apub_breaker_session::BreakerSession; use apub_core::session::RequestCountSession; use apub_openssl::OpenSsl; -use apub_reqwest::ReqwestClient; +use apub_reqwest::{ReqwestClient, SignatureConfig}; use example_types::{object_id, NoteType, ObjectId}; -use http_signature_normalization_reqwest::Config; use openssl::{pkey::PKey, rsa::Rsa}; use std::time::Duration; @@ -11,7 +10,7 @@ use std::time::Duration; async fn main() -> Result<(), Box> { let private_key = PKey::from_rsa(Rsa::generate(1024)?)?; let crypto = OpenSsl::new("key-id".to_string(), private_key); - let config = Config::default(); + let config = SignatureConfig::default(); let breakers = BreakerSession::limit(10, Duration::from_secs(60 * 60));