diff options
Diffstat (limited to 'src/access/challenge.rs')
| -rw-r--r-- | src/access/challenge.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/access/challenge.rs b/src/access/challenge.rs index 8df0f08..4dd8dfb 100644 --- a/src/access/challenge.rs +++ b/src/access/challenge.rs @@ -16,7 +16,7 @@ use base64::{Engine, engine::general_purpose::URL_SAFE_NO_PAD as B64URL}; use serde::{Deserialize, Serialize}; use super::{registry, sshsig}; -use crate::document::ReadDoc; +use crate::document::view::Read; use crate::identity::NodeKey; /// What a user's signature over a challenge is for (`sshsig`). @@ -70,7 +70,7 @@ pub(crate) struct Used(HashMap<String, (u64, String)>); /// `per_user` of its own still remembered. Why not, if not. #[allow(clippy::too_many_arguments)] pub(crate) fn take( - doc: &impl ReadDoc, + doc: &impl Read, key: &NodeKey, challenge: &str, signature: &str, @@ -150,8 +150,8 @@ pub(crate) fn take_with( mod tests { use super::*; use crate::document::Document; - use crate::document::store; use crate::document::testing::change; + use crate::document::view; use ed25519_dalek::SigningKey; use serde_json::json; @@ -163,12 +163,12 @@ mod tests { change(&mut doc, |doc| { let mut alice = registry::entry("root", 1, &[]); alice["keys"] = json!({ "laptop": line }); - store::write_path(doc, ®istry::user_path("alice"), &alice).unwrap(); + view::write_path(doc, ®istry::user_path("alice"), &alice).unwrap(); let mut carol = registry::entry("root", 1, &[]); carol["keys"] = json!({ "laptop": line }); carol["disabled"] = json!(true); - store::write_path(doc, ®istry::user_path("carol"), &carol).unwrap(); - store::write_path( + view::write_path(doc, ®istry::user_path("carol"), &carol).unwrap(); + view::write_path( doc, ®istry::user_path("bob"), ®istry::entry("root", 1, &[]), |
