reqwest-example: don't import signatures
This commit is contained in:
parent
8c199123e2
commit
abb8e2b7ac
|
@ -11,8 +11,6 @@ apub-core = { version = "0.1.0", path = "../../apub-core/" }
|
||||||
apub-reqwest = { version = "0.1.0", path = "../../apub-reqwest/" }
|
apub-reqwest = { version = "0.1.0", path = "../../apub-reqwest/" }
|
||||||
apub-openssl = { version = "0.1.0", path = "../../apub-openssl/" }
|
apub-openssl = { version = "0.1.0", path = "../../apub-openssl/" }
|
||||||
example-types = { version = "0.1.0", path = "../example-types/" }
|
example-types = { version = "0.1.0", path = "../example-types/" }
|
||||||
http-signature-normalization-reqwest = "0.2.0"
|
|
||||||
openssl = "0.10.13"
|
openssl = "0.10.13"
|
||||||
reqwest = "0.11.6"
|
reqwest = "0.11.6"
|
||||||
serde = { version = "1", features = ["derive"] }
|
|
||||||
tokio = { version = "1.14.0", features = ["full"] }
|
tokio = { version = "1.14.0", features = ["full"] }
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use apub_breaker_session::BreakerSession;
|
use apub_breaker_session::BreakerSession;
|
||||||
use apub_core::session::RequestCountSession;
|
use apub_core::session::RequestCountSession;
|
||||||
use apub_openssl::OpenSsl;
|
use apub_openssl::OpenSsl;
|
||||||
use apub_reqwest::ReqwestClient;
|
use apub_reqwest::{ReqwestClient, SignatureConfig};
|
||||||
use example_types::{object_id, NoteType, ObjectId};
|
use example_types::{object_id, NoteType, ObjectId};
|
||||||
use http_signature_normalization_reqwest::Config;
|
|
||||||
use openssl::{pkey::PKey, rsa::Rsa};
|
use openssl::{pkey::PKey, rsa::Rsa};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
@ -11,7 +10,7 @@ use std::time::Duration;
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let private_key = PKey::from_rsa(Rsa::generate(1024)?)?;
|
let private_key = PKey::from_rsa(Rsa::generate(1024)?)?;
|
||||||
let crypto = OpenSsl::new("key-id".to_string(), private_key);
|
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));
|
let breakers = BreakerSession::limit(10, Duration::from_secs(60 * 60));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue