mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 15:51:06 +01:00
update actix-web dependencies to v4 beta.10 (#203)
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
parent
627fe96be0
commit
545873b5b2
@ -2,9 +2,11 @@
|
||||
|
||||
## Unreleased - 2021-xx-xx
|
||||
* Make `Cors` middleware generic over body type [#195]
|
||||
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#195]: https://github.com/actix/actix-extras/pull/195
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
|
||||
## 0.6.0-beta.2 - 2021-06-27
|
||||
|
@ -17,7 +17,7 @@ name = "actix_cors"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { version = "4.0.0-beta.8", default-features = false }
|
||||
actix-web = { version = "4.0.0-beta.10", default-features = false }
|
||||
actix-service = "2.0.0"
|
||||
|
||||
derive_more = "0.99.5"
|
||||
|
@ -1,8 +1,11 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
|
||||
## 0.4.0-beta.2 - 2020-06-27
|
||||
* No notable changes.
|
||||
|
@ -15,12 +15,12 @@ path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-service = "2.0.0"
|
||||
actix-web = { version = "4.0.0-beta.8", default-features = false, features = ["cookies", "secure-cookies"] }
|
||||
actix-web = { version = "4.0.0-beta.10", default-features = false, features = ["cookies", "secure-cookies"] }
|
||||
futures-util = { version = "0.3.7", default-features = false }
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
time = "0.2.23"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-http = "3.0.0-beta.8"
|
||||
actix-http = "3.0.0-beta.11"
|
||||
actix-rt = "2"
|
||||
|
@ -90,7 +90,6 @@ impl Identity {
|
||||
/// }
|
||||
/// ```
|
||||
impl FromRequest for Identity {
|
||||
type Config = ();
|
||||
type Error = Error;
|
||||
type Future = Ready<Result<Identity, Error>>;
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
* Bump `prost` version to 0.8. [#197]
|
||||
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#197]: https://github.com/actix/actix-extras/pull/197
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
|
||||
## 0.7.0-beta.1 - 2020-06-27
|
||||
|
@ -19,7 +19,7 @@ path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "2"
|
||||
actix-web = { version = "4.0.0-beta.8", default_features = false }
|
||||
actix-web = { version = "4.0.0-beta.10", default_features = false }
|
||||
derive_more = "0.99.5"
|
||||
futures-util = { version = "0.3.7", default-features = false }
|
||||
prost = { version = "0.8", default_features = false }
|
||||
|
@ -8,7 +8,7 @@ authors = [
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
actix-web = "4.0.0-beta.8"
|
||||
actix-web = "4.0.0-beta.10"
|
||||
actix-protobuf = { path = "../../" }
|
||||
|
||||
env_logger = "0.8"
|
||||
|
@ -124,7 +124,6 @@ impl<T> FromRequest for ProtoBuf<T>
|
||||
where
|
||||
T: Message + Default + 'static,
|
||||
{
|
||||
type Config = ProtoBufConfig;
|
||||
type Error = Error;
|
||||
type Future = LocalBoxFuture<'static, Result<Self, Error>>;
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
|
||||
## 0.10.0-beta.2 - 2020-06-27
|
||||
* No notable changes.
|
||||
|
@ -32,7 +32,7 @@ web = [
|
||||
actix = { version = "0.12.0", default-features = false }
|
||||
actix-rt = { version = "2.1", default-features = false }
|
||||
actix-service = "2.0.0"
|
||||
actix-tls = { version = "3.0.0-beta.5", default-features = false, features = ["connect"] }
|
||||
actix-tls = { version = "3.0.0-beta.7", default-features = false, features = ["connect"] }
|
||||
|
||||
log = "0.4.6"
|
||||
backoff = "0.2.1"
|
||||
@ -45,15 +45,15 @@ tokio = { version = "1", features = ["sync"] }
|
||||
tokio-util = "0.6.1"
|
||||
|
||||
# actix-session
|
||||
actix-web = { version = "4.0.0-beta.8", default_features = false, optional = true }
|
||||
actix-web = { version = "4.0.0-beta.10", default_features = false, optional = true }
|
||||
actix-session = { version = "0.5.0-beta.2", optional = true }
|
||||
rand = { version = "0.8.0", optional = true }
|
||||
serde = { version = "1.0.101", optional = true }
|
||||
serde_json = { version = "1.0.40", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-test = "0.1.0-beta.3"
|
||||
actix-http = "3.0.0-beta.8"
|
||||
actix-test = "0.1.0-beta.5"
|
||||
actix-http = "3.0.0-beta.11"
|
||||
actix-rt = "2.1"
|
||||
env_logger = "0.8"
|
||||
serde = { version = "1.0.101", features = ["derive"] }
|
||||
|
@ -1,10 +1,12 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
* Impl `Clone` for `CookieSession`. [#201]
|
||||
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#201]: https://github.com/actix/actix-extras/pull/201
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
|
||||
## 0.5.0-beta.2 - 2020-06-27
|
||||
|
@ -18,7 +18,7 @@ default = ["cookie-session"]
|
||||
cookie-session = ["actix-web/secure-cookies"]
|
||||
|
||||
[dependencies]
|
||||
actix-web = { version = "4.0.0-beta.8", default_features = false, features = ["cookies"] }
|
||||
actix-web = { version = "4.0.0-beta.10", default_features = false, features = ["cookies"] }
|
||||
actix-service = "2.0.0"
|
||||
|
||||
derive_more = "0.99.5"
|
||||
|
@ -307,7 +307,6 @@ impl Session {
|
||||
impl FromRequest for Session {
|
||||
type Error = Error;
|
||||
type Future = Ready<Result<Session, Error>>;
|
||||
type Config = ();
|
||||
|
||||
#[inline]
|
||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||
@ -321,8 +320,8 @@ mod tests {
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn session() {
|
||||
#[actix_web::test]
|
||||
async fn session() {
|
||||
let mut req = test::TestRequest::default().to_srv_request();
|
||||
|
||||
Session::set_session(
|
||||
@ -342,8 +341,8 @@ mod tests {
|
||||
assert_eq!(changes, [("key2".to_string(), "\"value2\"".to_string())]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_session() {
|
||||
#[actix_web::test]
|
||||
async fn get_session() {
|
||||
let mut req = test::TestRequest::default().to_srv_request();
|
||||
|
||||
Session::set_session(
|
||||
@ -356,8 +355,8 @@ mod tests {
|
||||
assert_eq!(res, Some(true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_session_from_request_head() {
|
||||
#[actix_web::test]
|
||||
async fn get_session_from_request_head() {
|
||||
let mut req = test::TestRequest::default().to_srv_request();
|
||||
|
||||
Session::set_session(
|
||||
@ -370,8 +369,8 @@ mod tests {
|
||||
assert_eq!(res, Some(10));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn purge_session() {
|
||||
#[actix_web::test]
|
||||
async fn purge_session() {
|
||||
let req = test::TestRequest::default().to_srv_request();
|
||||
let session = Session::get_session(&mut *req.extensions_mut());
|
||||
assert_eq!(session.0.borrow().status, SessionStatus::Unchanged);
|
||||
@ -379,8 +378,8 @@ mod tests {
|
||||
assert_eq!(session.0.borrow().status, SessionStatus::Purged);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn renew_session() {
|
||||
#[actix_web::test]
|
||||
async fn renew_session() {
|
||||
let req = test::TestRequest::default().to_srv_request();
|
||||
let session = Session::get_session(&mut *req.extensions_mut());
|
||||
assert_eq!(session.0.borrow().status, SessionStatus::Unchanged);
|
||||
@ -388,8 +387,8 @@ mod tests {
|
||||
assert_eq!(session.0.borrow().status, SessionStatus::Renewed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn session_entries() {
|
||||
#[actix_web::test]
|
||||
async fn session_entries() {
|
||||
let session = Session(Rc::new(RefCell::new(SessionInner::default())));
|
||||
session.insert("test_str", "val").unwrap();
|
||||
session.insert("test_num", 1).unwrap();
|
||||
|
@ -1,8 +1,11 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2020-xx-xx
|
||||
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
* Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
|
||||
## 0.6.0-beta.2 - 2020-06-27
|
||||
* No notable changes.
|
||||
|
@ -18,7 +18,7 @@ name = "actix_web_httpauth"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { version = "4.0.0-beta.8", default_features = false }
|
||||
actix-web = { version = "4.0.0-beta.10", default_features = false }
|
||||
actix-service = "2.0.0"
|
||||
base64 = "0.13"
|
||||
futures-util = { version = "0.3.7", default-features = false }
|
||||
|
@ -105,7 +105,6 @@ impl BasicAuth {
|
||||
|
||||
impl FromRequest for BasicAuth {
|
||||
type Future = Ready<Result<Self, Self::Error>>;
|
||||
type Config = Config;
|
||||
type Error = AuthenticationError<Challenge>;
|
||||
|
||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> <Self as FromRequest>::Future {
|
||||
@ -115,7 +114,7 @@ impl FromRequest for BasicAuth {
|
||||
.map_err(|_| {
|
||||
// TODO: debug! the original error
|
||||
let challenge = req
|
||||
.app_data::<Self::Config>()
|
||||
.app_data::<Config>()
|
||||
.map(|config| config.0.clone())
|
||||
// TODO: Add trace! about `Default::default` call
|
||||
.unwrap_or_else(Default::default);
|
||||
|
@ -103,7 +103,6 @@ impl BearerAuth {
|
||||
}
|
||||
|
||||
impl FromRequest for BearerAuth {
|
||||
type Config = Config;
|
||||
type Future = Ready<Result<Self, Self::Error>>;
|
||||
type Error = AuthenticationError<bearer::Bearer>;
|
||||
|
||||
@ -113,7 +112,7 @@ impl FromRequest for BearerAuth {
|
||||
.map(|auth| BearerAuth(auth.into_scheme()))
|
||||
.map_err(|_| {
|
||||
let bearer = req
|
||||
.app_data::<Self::Config>()
|
||||
.app_data::<Config>()
|
||||
.map(|config| config.0.clone())
|
||||
.unwrap_or_else(Default::default);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user