Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-22 05:10:29 +01:00
Code style changes
Dieser Commit ist enthalten in:
Ursprung
5a8d5e426d
Commit
82e2b8a8c0
1 geänderte Dateien mit 4 neuen und 8 gelöschten Zeilen
|
@ -561,14 +561,10 @@ fn verify_yubikey_otp(otp: String) -> JsonResult {
|
||||||
let yubico = Yubico::new();
|
let yubico = Yubico::new();
|
||||||
let config = Config::default().set_client_id(CONFIG.yubico_client_id.to_owned()).set_key(CONFIG.yubico_secret_key.to_owned());
|
let config = Config::default().set_client_id(CONFIG.yubico_client_id.to_owned()).set_key(CONFIG.yubico_secret_key.to_owned());
|
||||||
|
|
||||||
let result;
|
let result = match CONFIG.yubico_server {
|
||||||
|
Some(ref server) => yubico.verify(otp, config.set_api_hosts(vec![server.to_owned()])),
|
||||||
if CONFIG.yubico_server.is_some() {
|
None => yubico.verify(otp, config)
|
||||||
result = yubico.verify(otp, config.set_api_hosts(vec![CONFIG.yubico_server.to_owned().unwrap()]));
|
};
|
||||||
}
|
|
||||||
else {
|
|
||||||
result = yubico.verify(otp, config);
|
|
||||||
}
|
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(_answer) => Ok(Json(json!({}))),
|
Ok(_answer) => Ok(Json(json!({}))),
|
||||||
|
|
Laden …
In neuem Issue referenzieren