pub struct DeviceBindingConfig {
pub enabled: bool,
pub trust_expiration_days: i64,
pub reauth_interval_days: i64,
pub max_devices_per_user: usize,
pub risk_threshold: u8,
pub require_mfa_for_registration: bool,
pub auto_revoke_on_suspicion: bool,
pub sensitive_operations: Vec<String>,
pub min_fingerprint_similarity: f64,
pub enable_location_risk: bool,
pub enable_ip_risk: bool,
}Expand description
Device binding configuration
Fields§
§enabled: boolEnable device binding
trust_expiration_days: i64Trust expiration (days)
reauth_interval_days: i64Require re-authentication interval (days)
max_devices_per_user: usizeMaximum devices per user
risk_threshold: u8Risk score threshold for trust (0-100)
require_mfa_for_registration: boolRequire MFA for device registration
auto_revoke_on_suspicion: boolAutomatically revoke devices on suspicious activity
sensitive_operations: Vec<String>Operations that always require MFA (even on trusted devices)
min_fingerprint_similarity: f64Minimum fingerprint similarity for device recognition (0.0-1.0)
enable_location_risk: boolEnable location-based risk scoring
enable_ip_risk: boolEnable IP-based risk scoring
Implementations§
Source§impl DeviceBindingConfig
impl DeviceBindingConfig
Sourcepub fn new_default() -> Self
pub fn new_default() -> Self
Create default configuration
Sourcepub fn is_sensitive_operation(&self, operation: &str) -> bool
pub fn is_sensitive_operation(&self, operation: &str) -> bool
Check if operation is sensitive
Trait Implementations§
Source§impl Clone for DeviceBindingConfig
impl Clone for DeviceBindingConfig
Source§fn clone(&self) -> DeviceBindingConfig
fn clone(&self) -> DeviceBindingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceBindingConfig
impl Debug for DeviceBindingConfig
Source§impl<'de> Deserialize<'de> for DeviceBindingConfig
impl<'de> Deserialize<'de> for DeviceBindingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DeviceBindingConfig
impl RefUnwindSafe for DeviceBindingConfig
impl Send for DeviceBindingConfig
impl Sync for DeviceBindingConfig
impl Unpin for DeviceBindingConfig
impl UnsafeUnpin for DeviceBindingConfig
impl UnwindSafe for DeviceBindingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more