mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-11-22 01:11:00 +00:00
Update actix deps
This commit is contained in:
parent
d3c715ecc5
commit
0478d08a97
6 changed files with 16 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "http-signature-normalization-actix"
|
name = "http-signature-normalization-actix"
|
||||||
description = "An HTTP Signatures library that leaves the signing to you"
|
description = "An HTTP Signatures library that leaves the signing to you"
|
||||||
version = "0.5.0-beta.3"
|
version = "0.5.0-beta.4"
|
||||||
authors = ["asonix <asonix@asonix.dog>"]
|
authors = ["asonix <asonix@asonix.dog>"]
|
||||||
license-file = "LICENSE"
|
license-file = "LICENSE"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -25,8 +25,8 @@ name = "client"
|
||||||
required-features = ["sha-2"]
|
required-features = ["sha-2"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = { version = "4.0.0-beta.3", default-features = false }
|
actix-web = { version = "4.0.0-beta.4", default-features = false }
|
||||||
awc = "3.0.0-beta.2"
|
awc = "3.0.0-beta.3"
|
||||||
base64 = { version = "0.13", optional = true }
|
base64 = { version = "0.13", optional = true }
|
||||||
chrono = "0.4.6"
|
chrono = "0.4.6"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
|
@ -37,5 +37,5 @@ sha3 = { version = "0.9", optional = true }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "2.0.2"
|
actix-rt = "2.1.0"
|
||||||
pretty_env_logger = "0.4"
|
pretty_env_logger = "0.4"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use actix_web::{client::Client, error::BlockingError};
|
use actix_web::error::BlockingError;
|
||||||
|
use awc::Client;
|
||||||
use http_signature_normalization_actix::prelude::*;
|
use http_signature_normalization_actix::prelude::*;
|
||||||
use sha2::{Digest, Sha256};
|
use sha2::{Digest, Sha256};
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
//! Digest headers are commonly used in conjunction with HTTP Signatures to verify the whole
|
//! Digest headers are commonly used in conjunction with HTTP Signatures to verify the whole
|
||||||
//! request when request bodies are present
|
//! request when request bodies are present
|
||||||
|
|
||||||
use actix_web::{client::ClientRequest, error::BlockingError, http::header::InvalidHeaderValue};
|
use actix_web::{error::BlockingError, http::header::InvalidHeaderValue};
|
||||||
use awc::SendClientRequest;
|
use awc::{ClientRequest, SendClientRequest};
|
||||||
use std::{fmt::Display, future::Future, pin::Pin};
|
use std::{fmt::Display, future::Future, pin::Pin};
|
||||||
|
|
||||||
use crate::{Config, PrepareSignError, Sign};
|
use crate::{Config, PrepareSignError, Sign};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use actix_web::{
|
use actix_web::{error::BlockingError, http::header::InvalidHeaderValue, web};
|
||||||
client::ClientRequest, error::BlockingError, http::header::InvalidHeaderValue, web,
|
use awc::ClientRequest;
|
||||||
};
|
|
||||||
use std::{fmt::Display, future::Future, pin::Pin};
|
use std::{fmt::Display, future::Future, pin::Pin};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//! # Integration of Http Signature Normalization with Actix Web
|
//! # Integration of Http Signature Normalization with Actix Web
|
||||||
//!
|
//!
|
||||||
//! This library provides middlewares for verifying HTTP Signature headers and, optionally, Digest
|
//! This library provides middlewares for verifying HTTP Signature headers and, optionally, Digest
|
||||||
//! headers with the `digest` feature enabled. It also extends actix_web's ClientRequest type to
|
//! headers with the `digest` feature enabled. It also extends awc's ClientRequest type to
|
||||||
//! add signatures and digests to the request
|
//! add signatures and digests to the request
|
||||||
//!
|
//!
|
||||||
//! ### Use it in a server
|
//! ### Use it in a server
|
||||||
|
@ -99,7 +99,8 @@
|
||||||
//!
|
//!
|
||||||
//! ### Use it in a client
|
//! ### Use it in a client
|
||||||
//! ```rust,ignore
|
//! ```rust,ignore
|
||||||
//! use actix_web::{client::Client, error::BlockingError};
|
//! use actix_web::error::BlockingError;
|
||||||
|
//! use awc::Client;
|
||||||
//! use http_signature_normalization_actix::prelude::*;
|
//! use http_signature_normalization_actix::prelude::*;
|
||||||
//! use sha2::{Digest, Sha256};
|
//! use sha2::{Digest, Sha256};
|
||||||
//!
|
//!
|
||||||
|
@ -229,7 +230,7 @@ pub trait SignatureVerify {
|
||||||
) -> Self::Future;
|
) -> Self::Future;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A trait implemented by the Actix Web ClientRequest type to add an HTTP signature to the request
|
/// A trait implemented by the awc ClientRequest type to add an HTTP signature to the request
|
||||||
pub trait Sign {
|
pub trait Sign {
|
||||||
/// Add an Authorization Signature to the request
|
/// Add an Authorization Signature to the request
|
||||||
fn authorization_signature<F, E, K>(
|
fn authorization_signature<F, E, K>(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use actix_web::{
|
use actix_web::{error::BlockingError, http::header::InvalidHeaderValue, web};
|
||||||
client::ClientRequest, error::BlockingError, http::header::InvalidHeaderValue, web,
|
use awc::ClientRequest;
|
||||||
};
|
|
||||||
use std::{fmt::Display, future::Future, pin::Pin};
|
use std::{fmt::Display, future::Future, pin::Pin};
|
||||||
|
|
||||||
use crate::{create::Signed, Config, PrepareSignError, Sign};
|
use crate::{create::Signed, Config, PrepareSignError, Sign};
|
||||||
|
|
Loading…
Reference in a new issue