diff --git a/Cargo.toml b/Cargo.toml index 0f261c5..1813630 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ctap_hmac" description = "A Rust implementation of the FIDO2 CTAP protocol, including the HMAC extension" -version = "0.4.3" +version = "0.4.4" license = "Apache-2.0/MIT" homepage = "https://github.com/shimunn/ctap" repository = "https://github.com/shimunn/ctap" diff --git a/src/lib.rs b/src/lib.rs index d30b36f..e057576 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -325,6 +325,11 @@ impl FidoDevice { } } + /// True if this authenticator requires a PIN + pub fn needs_pin(&self) -> bool { + self.needs_pin + } + /// Unlock the device with the provided PIN. Internally this will generate /// an ECDH keypair, send the encrypted PIN to the device and store the PIN /// token that the device generates on every power cycle. The PIN itself is