Skip to content

Commit

Permalink
Improve presentation exchange support
Browse files Browse the repository at this point in the history
More complete Presentation Exchange implementation, using `jsonschema` for constraint validation.

---------

Signed-off-by: Ryan Tate <[email protected]>
Co-authored-by: Todd Showalter <[email protected]>
  • Loading branch information
Ryanmtate and Todd Showalter authored Aug 16, 2024
1 parent 7879553 commit a3a9209
Show file tree
Hide file tree
Showing 4 changed files with 690 additions and 58 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ async-trait = "0.1.73"
base64 = "0.21.4"
did-web = "0.2.2"
http = "1.1.0"
jsonpath_lib = "0.3.0"
jsonschema = "0.18.0"
p256 = { version = "0.13.2", features = ["jwk"], optional = true }
regex = "1.10.6"
reqwest = { version = "0.12.5", features = ["rustls-tls"], optional = true }
serde = "1.0.188"
serde_cbor = "0.11.2"
serde_json = "1.0.107"
serde_qs = "0.12.0"
serde_urlencoded = "0.7.1"
ssi = "0.7.0"
ssi = "0.7"
thiserror = "1.0.49"
tokio = "1.32.0"
tracing = "0.1.37"
Expand Down
6 changes: 3 additions & 3 deletions src/core/response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ mod test {
let object: UntypedObject = serde_json::from_value(json!(
{
"presentation_submission": {
"id": "id",
"definition_id": "definition_id",
"id": "d05a7f51-ac09-43af-8864-e00f0175f2c7",
"definition_id": "f619e64a-8f80-4b71-8373-30cf07b1e4f2",
"descriptor_map": []
},
"vp_token": "string"
Expand All @@ -119,7 +119,7 @@ mod test {
let response = UnencodedAuthorizationResponse::try_from(object).unwrap();
assert_eq!(
response.into_x_www_form_urlencoded().unwrap(),
"presentation_submission=%7B%22definition_id%22%3A%22definition_id%22%2C%22descriptor_map%22%3A%5B%5D%2C%22id%22%3A%22id%22%7D&vp_token=string",
"presentation_submission=%7B%22id%22%3A%22d05a7f51-ac09-43af-8864-e00f0175f2c7%22%2C%22definition_id%22%3A%22f619e64a-8f80-4b71-8373-30cf07b1e4f2%22%2C%22descriptor_map%22%3A%5B%5D%7D&vp_token=string",
)
}
}
Loading

0 comments on commit a3a9209

Please sign in to comment.