mirror of
https://forge.pointfixe.fr/hubert/gitust.git
synced 2026-02-04 10:17:28 +01:00
print error when validating
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
use actix_session::Session;
|
use actix_session::Session;
|
||||||
use actix_web::Error;
|
|
||||||
use actix_web_httpauth::extractors::basic::BasicAuth;
|
use actix_web_httpauth::extractors::basic::BasicAuth;
|
||||||
|
|
||||||
pub trait AuthValidator {
|
pub trait AuthValidator {
|
||||||
@@ -13,7 +12,10 @@ pub trait AuthValidator {
|
|||||||
let result = session.get::<String>("user");
|
let result = session.get::<String>("user");
|
||||||
match result {
|
match result {
|
||||||
Ok(username) => {username.map(|u| User(u))}
|
Ok(username) => {username.map(|u| User(u))}
|
||||||
Err(e) => {None}
|
Err(e) => {
|
||||||
|
println!("{}", e);
|
||||||
|
None
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user