1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-07-03 22:45:01 +00:00

Can register a new key

This commit is contained in:
2021-05-14 10:58:11 +02:00
parent 70860ab184
commit 3838cf3e03
9 changed files with 67 additions and 6 deletions

View File

@ -551,6 +551,13 @@ pub trait BaseRequestHandler {
Ok(list)
}
/// Get the response to a key register credential included in the request
fn post_register_public_key_credential(&mut self, name: &str) -> Res<webauthn_rs::proto::RegisterPublicKeyCredential> {
let str = self.post_string(name)?;
Ok(serde_json::from_str(&str)?)
}
/// Get the ID of a user included in a POST request
fn post_user_id(&mut self, name: &str) -> ResultBoxError<UserID> {
let user_id = UserID::new(self.post_u64(name)?);