Share owned host API state between HTTP hooks and native pages
This commit is contained in:
@@ -42,7 +42,10 @@ fn fixture() -> (tempfile::TempDir, Cred, Caller, Item) {
|
||||
.unwrap();
|
||||
(dir, c, caller, item)
|
||||
}
|
||||
fn register(host: &mut Passkeys<'_>, auth: &mut WebauthnAuthenticator<SoftPasskey>) {
|
||||
fn register(
|
||||
host: &mut Passkeys<&rusqlite::Connection>,
|
||||
auth: &mut WebauthnAuthenticator<SoftPasskey>,
|
||||
) {
|
||||
let start = host.start_registration("test".into(), None).unwrap();
|
||||
let response = auth
|
||||
.do_registration(Url::parse("http://localhost:8000").unwrap(), start.options)
|
||||
@@ -50,7 +53,7 @@ fn register(host: &mut Passkeys<'_>, auth: &mut WebauthnAuthenticator<SoftPasske
|
||||
host.finish_registration(&start.id, response).unwrap();
|
||||
}
|
||||
fn proof(
|
||||
host: &mut Passkeys<'_>,
|
||||
host: &mut Passkeys<&rusqlite::Connection>,
|
||||
auth: &mut WebauthnAuthenticator<SoftPasskey>,
|
||||
binding: Binding,
|
||||
) -> webauthn::Verified {
|
||||
|
||||
Reference in New Issue
Block a user