implement a more consistent login mask with a stable layout and improved error messages

This commit is contained in:
Frederic Laing 2025-11-12 20:35:10 +01:00 committed by Ashley Wulber
parent f7e470ca58
commit 97d69f37e9
5 changed files with 352 additions and 78 deletions

View file

@ -54,10 +54,14 @@ fn main() {
Request::PostAuthMessageResponse { response } => {
match response.as_deref() {
Some("password") => Response::Success,
_ => Response::Error {
error_type: ErrorType::AuthError,
description: "AUTH_ERR".to_string(),
},
_ => {
// Add 1 second delay to simulate real PAM authentication failure behavior
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
Response::Error {
error_type: ErrorType::AuthError,
description: "AUTH_ERR".to_string(),
}
}
}
}
Request::StartSession { .. } => Response::Success,