fix: merge errors

This commit is contained in:
cduvray 2023-03-30 07:36:52 +02:00
parent 9054f400dc
commit e409bee3b3

View file

@ -11,15 +11,15 @@ use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
use tower_cookies::Cookies;
use tower_layer::Layer;
use tower_service::Service;
use tower_cookies::Cookies;
use crate::authorizer::{Authorizer, FnClaimsChecker, KeySourceType};
use crate::error::InitError;
use crate::jwks::key_store_manager::Refresh;
use crate::validation::Validation;
use crate::{AuthError, layer, RefreshStrategy};
use crate::{layer, AuthError, RefreshStrategy};
/// Authorizer Layer builder
///
@ -81,6 +81,7 @@ where
refresh: Default::default(),
claims_checker: None,
validation: None,
jwt_source: JwtSource::Bearer,
}
}
@ -102,6 +103,7 @@ where
refresh: Default::default(),
claims_checker: None,
validation: None,
jwt_source: JwtSource::Bearer,
}
}
@ -123,6 +125,7 @@ where
refresh: Default::default(),
claims_checker: None,
validation: None,
jwt_source: JwtSource::Bearer,
}
}
@ -219,7 +222,9 @@ where
if let Some(c) = request.extensions().get::<Cookies>() {
c.get(name.as_str()).and_then(|c| Some(String::from(c.value())))
} else {
tracing::warn!("You have to add the tower_cookies::CookieManagerLayer middleware to use Cookies as JWT source.");
tracing::warn!(
"You have to add the tower_cookies::CookieManagerLayer middleware to use Cookies as JWT source."
);
None
}
}