reqwest-example: don't import signatures

This commit is contained in:
Aode (lion) 2021-11-18 16:09:25 -06:00
parent 8c199123e2
commit abb8e2b7ac
2 changed files with 2 additions and 5 deletions

View file

@ -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"] }

View file

@ -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<dyn std::error::Error>> {
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));