1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

update actix-web dependencies to v4 beta.10 (#203)

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
Chiu-Hsiang Hsu
2021-10-21 13:10:00 +00:00
committed by GitHub
parent 627fe96be0
commit 545873b5b2
18 changed files with 42 additions and 32 deletions

View File

@ -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);

View File

@ -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);