mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
parent
b432c79302
commit
9f3352cf71
|
@ -8,9 +8,10 @@
|
|||
#![deny(clippy::needless_pass_by_value)]
|
||||
#![deny(clippy::trivially_copy_pass_by_ref)]
|
||||
|
||||
use kanidm_client::KanidmClientBuilder;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use kanidm_client::{ClientError, KanidmClientBuilder};
|
||||
|
||||
use log::{debug, error};
|
||||
use structopt::StructOpt;
|
||||
|
||||
|
@ -72,9 +73,13 @@ fn main() {
|
|||
});
|
||||
client.auth_simple_password(opt.username.as_str(), password.as_str())
|
||||
};
|
||||
|
||||
if r.is_err() {
|
||||
eprintln!("Error during authentication phase: {:?}", r);
|
||||
match r {
|
||||
Err(ClientError::Transport(value)) => {
|
||||
error!("Failed to connect to kanidm server: {}", value.to_string());
|
||||
}
|
||||
_ => error!("Error during authentication phase: {:?}", r),
|
||||
}
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue