Skip to content

Commit

Permalink
Fix bug in verification of presentation with key binding that uses di…
Browse files Browse the repository at this point in the history
…fferent algorithm. Resolves #33

Signed-off-by: Aziz Mukhtorjonov <[email protected]>
  • Loading branch information
AzizMukhtorjonov committed Sep 10, 2024
1 parent 7a62547 commit 58bdb76
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,18 @@ mod tests {
)
.unwrap()
.verified_claims;
assert_eq!(user_claims, verified_claims);

let claims_to_check = json!({
"iss": user_claims["iss"].clone(),
"iat": user_claims["iat"].clone(),
"exp": user_claims["exp"].clone(),
"cnf": {
"jwk": serde_json::from_str::<Value>(HOLDER_JWK_KEY_ED25519).expect("Valid JSON"),
},
"sub": user_claims["sub"].clone(),
"address": user_claims["address"].clone(),
});

assert_eq!(claims_to_check, verified_claims);
}
}

0 comments on commit 58bdb76

Please sign in to comment.