diff --git a/src/api/core/two_factor/duo.rs b/src/api/core/two_factor/duo.rs index 289f01b3..aa281ae7 100644 --- a/src/api/core/two_factor/duo.rs +++ b/src/api/core/two_factor/duo.rs @@ -26,8 +26,8 @@ pub fn routes() -> Vec { #[derive(Serialize, Deserialize)] struct DuoData { host: String, // Duo API hostname - ik: String, // integration key - sk: String, // secret key + ik: String, // client id + sk: String, // client secret } impl DuoData { @@ -111,8 +111,8 @@ async fn get_duo(data: Json, headers: Headers, mut conn: DbCo json!({ "enabled": enabled, "host": data.host, - "secretKey": data.sk, - "integrationKey": data.ik, + "clientSecret": data.sk, + "clientId": data.ik, "object": "twoFactorDuo" }) } else { @@ -129,8 +129,8 @@ async fn get_duo(data: Json, headers: Headers, mut conn: DbCo #[serde(rename_all = "camelCase")] struct EnableDuoData { host: String, - secret_key: String, - integration_key: String, + client_secret: String, + client_id: String, master_password_hash: Option, otp: Option, } @@ -139,8 +139,8 @@ impl From for DuoData { fn from(d: EnableDuoData) -> Self { Self { host: d.host, - ik: d.integration_key, - sk: d.secret_key, + ik: d.client_id, + sk: d.client_secret, } } } @@ -151,7 +151,7 @@ fn check_duo_fields_custom(data: &EnableDuoData) -> bool { st.is_empty() || s == DISABLED_MESSAGE_DEFAULT } - !empty_or_default(&data.host) && !empty_or_default(&data.secret_key) && !empty_or_default(&data.integration_key) + !empty_or_default(&data.host) && !empty_or_default(&data.client_secret) && !empty_or_default(&data.client_id) } #[post("/two-factor/duo", data = "")] @@ -186,8 +186,8 @@ async fn activate_duo(data: Json, headers: Headers, mut conn: DbC Ok(Json(json!({ "enabled": true, "host": data.host, - "secretKey": data.sk, - "integrationKey": data.ik, + "clientSecret": data.sk, + "clientId": data.ik, "object": "twoFactorDuo" }))) } diff --git a/src/config.rs b/src/config.rs index 853f7cfa..09e6ac37 100644 --- a/src/config.rs +++ b/src/config.rs @@ -670,9 +670,9 @@ make_config! { _enable_duo: bool, true, def, true; /// Attempt to use deprecated iframe-based Traditional Prompt (Duo WebSDK 2) duo_use_iframe: bool, false, def, false; - /// Integration Key + /// Client Id duo_ikey: String, true, option; - /// Secret Key + /// Client Secret duo_skey: Pass, true, option; /// Host duo_host: String, true, option;