pub struct PinConfig {
pub enforcement: PinEnforcement,
pub min_length: u8,
pub max_retries: u8,
pub max_uv_retries: u8,
pub auto_lock_timeout: u32,
}Expand description
PIN configuration
Fields§
§enforcement: PinEnforcementPIN enforcement policy when PIN is set:
- “never”: Always use notification fallback (backward compatible, convenience)
- “optional”: Use PIN only when always_uv=true or client requests UV
- “required”: Always require PIN when set (most secure)
min_length: u8Minimum PIN length in characters (CTAP spec: 4-63)
max_retries: u8Maximum PIN retry attempts before lockout (CTAP spec: 8)
max_uv_retries: u8Maximum user verification retry attempts before UV is blocked (default: 8)
This controls how many consecutive UV failures are allowed before UV is blocked.
Use passless client pin uv-reset to restore the retry counter after authentication.
Higher values improve usability but may reduce security against brute-force attacks.
auto_lock_timeout: u32Auto-lock timeout in seconds after max failed attempts (0 = disabled) After lockout, authenticator must be reset to use PIN again
Implementations§
Source§impl PinConfig
impl PinConfig
Sourcepub fn field_docs() -> &'static [(&'static str, &'static str)]
pub fn field_docs() -> &'static [(&'static str, &'static str)]
Get documentation for all fields Returns an array of (field_name, documentation) tuples
Sourcepub fn struct_doc() -> &'static str
pub fn struct_doc() -> &'static str
Get struct-level documentation
Sourcepub fn to_toml_fields(&self) -> Vec<(&'static str, String)>
pub fn to_toml_fields(&self) -> Vec<(&'static str, String)>
Get field values as TOML-formatted strings