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
Trait Implementations§
Source§impl ClapSerde for PinConfig
impl ClapSerde for PinConfig
Source§fn update(&mut self, other: impl BorrowMut<Self::Opt>)
fn update(&mut self, other: impl BorrowMut<Self::Opt>)
Merge in place from Opt struct. Read more
Source§fn merge_clap(self) -> Self
fn merge_clap(self) -> Self
Merge from clap to the object.
Source§fn merge_clap_with_args<I, T>(self, itr: I) -> Self
fn merge_clap_with_args<I, T>(self, itr: I) -> Self
Merge from clap to the object with the given args
Source§fn from_clap_with_args<I, T>(itr: I) -> Self
fn from_clap_with_args<I, T>(itr: I) -> Self
Create new object parsing from clap with the given args
Source§impl<'de> Deserialize<'de> for PinConfig
impl<'de> Deserialize<'de> for PinConfig
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 Forget for PinConfig
impl Freeze for PinConfig
impl Move for PinConfig
impl RefUnwindSafe for PinConfig
impl Send for PinConfig
impl Sync for PinConfig
impl Unpin for PinConfig
impl UnsafeUnpin for PinConfig
impl UnwindSafe for PinConfig
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