From ea1fc7b64dd9bbd591e9ec13f47ffd4a964d1149 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Wed, 10 May 2023 14:00:50 -0400 Subject: [PATCH] ctap2-proto: Define prelude --- crates/ctap2-proto/src/lib.rs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/crates/ctap2-proto/src/lib.rs b/crates/ctap2-proto/src/lib.rs index 6a43442..3e863cf 100644 --- a/crates/ctap2-proto/src/lib.rs +++ b/crates/ctap2-proto/src/lib.rs @@ -1,20 +1,27 @@ -use authenticator::{ - assertion::get, - bio_enrollment, client_pin, config, - credential::{make, management}, - reset, -}; +pub mod prelude { + pub use crate::{ + authenticator::{ + assertion::get, + bio_enrollment, client_pin, config, + credential::{make, management}, + device, reset, selection, + }, + Ctap2_2Authenticator, + }; +} pub mod attestation; pub mod authenticator; pub mod extensions; +use prelude::*; + /// Defines the raw CTAP operations pub trait Ctap2_2Authenticator { #[allow(clippy::missing_errors_doc)] /// > This method is invoked by the host to request generation of a new /// > credential in the authenticator. - fn make_credential(request: make::Request) -> Result; + fn make_credential(&mut self, request: make::Request) -> Result; #[allow(clippy::missing_errors_doc)] /// > This method is used by a host to request cryptographic proof of user