mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-12 08:00:07 +01:00
fix: clippy
This commit is contained in:
parent
e409bee3b3
commit
3292d59d1c
1 changed files with 2 additions and 2 deletions
|
|
@ -216,11 +216,11 @@ where
|
|||
let token = match &self.jwt_source {
|
||||
layer::JwtSource::Bearer => {
|
||||
let bearer_o: Option<Authorization<Bearer>> = h.typed_get();
|
||||
bearer_o.and_then(|b| Some(String::from(b.0.token())))
|
||||
bearer_o.map(|b| String::from(b.0.token()))
|
||||
}
|
||||
layer::JwtSource::Cookie(name) => {
|
||||
if let Some(c) = request.extensions().get::<Cookies>() {
|
||||
c.get(name.as_str()).and_then(|c| Some(String::from(c.value())))
|
||||
c.get(name.as_str()).map(|c| String::from(c.value()))
|
||||
} else {
|
||||
tracing::warn!(
|
||||
"You have to add the tower_cookies::CookieManagerLayer middleware to use Cookies as JWT source."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue