Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions libwebauthn/src/ops/webauthn/get_assertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1246,13 +1246,9 @@ mod tests {

#[tokio::test]
async fn test_prf_eval_by_credential_variable_length() {
// NOTE: the IDL field is currently deserialized as `eval_by_credential`
// rather than the spec name `evalByCredential` — separate concern from
// #209. Use the field name the deserializer accepts.
let prf = parse_prf(
r#"{"prf":{"eval_by_credential":{"Y3JlZDE":{"first":"AQ","second":"AgIC"}}}}"#,
)
.await;
let prf =
parse_prf(r#"{"prf":{"evalByCredential":{"Y3JlZDE":{"first":"AQ","second":"AgIC"}}}}"#)
.await;
let v = prf.eval_by_credential.get("Y3JlZDE").expect("entry");
assert_eq!(v.first, vec![0x01]);
assert_eq!(v.second.as_deref(), Some(&[0x02u8, 0x02, 0x02][..]));
Expand Down
1 change: 1 addition & 0 deletions libwebauthn/src/ops/webauthn/idl/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub struct LargeBlobInputJson {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PrfInputJson {
pub eval: Option<PrfValuesJson>,
pub eval_by_credential: Option<HashMap<String, PrfValuesJson>>,
Expand Down
Loading