Skip to content

Commit 326f906

Browse files
committed
send location mfa mode
1 parent ab997d1 commit 326f906

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

crates/defguard_core/src/handlers/network_devices.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use defguard_common::{
1515
models::{
1616
Device, DeviceConfig, DeviceType, Settings, User, WireguardNetwork,
1717
device::{DeviceInfo, WireguardNetworkDevice},
18-
wireguard::NetworkAddressError,
18+
wireguard::{LocationMfaMode, NetworkAddressError},
1919
},
2020
},
2121
utils::{SplitIp, split_ip},
@@ -120,6 +120,7 @@ pub(crate) struct DeviceWireGuardConfig {
120120
pub(crate) network_id: Id,
121121
pub(crate) network_name: String,
122122
pub(crate) config: String,
123+
pub(crate) location_mfa_mode: LocationMfaMode,
123124
}
124125

125126
/// For a given device, retrieve all WireGuard configuations for all networks.
@@ -162,6 +163,7 @@ pub(crate) async fn network_device_configs(
162163
network_id: network.id,
163164
network_name: network.name,
164165
config,
166+
location_mfa_mode: network.location_mfa_mode.clone(),
165167
};
166168
result.push(device_config);
167169
}

crates/defguard_core/src/handlers/wireguard.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,7 @@ pub(crate) async fn user_device_configs(
13951395
network_id: location.id,
13961396
network_name: location.name,
13971397
config,
1398+
location_mfa_mode: location.location_mfa_mode.clone(),
13981399
});
13991400
}
14001401

0 commit comments

Comments
 (0)