@@ -33,10 +33,10 @@ async fn adobe_connected_identities() {
3333
3434 let mut test_image = Cursor :: new ( test_image) ;
3535
36- let manifest_store = Reader :: from_stream ( format, & mut test_image) . unwrap ( ) ;
37- assert_eq ! ( manifest_store . validation_status( ) , None ) ;
36+ let reader = Reader :: from_stream ( format, & mut test_image) . unwrap ( ) ;
37+ assert_eq ! ( reader . validation_status( ) , None ) ;
3838
39- let manifest = manifest_store . active_manifest ( ) . unwrap ( ) ;
39+ let manifest = reader . active_manifest ( ) . unwrap ( ) ;
4040 let mut ia_iter = IdentityAssertion :: from_manifest ( manifest) ;
4141
4242 // Should find exactly one identity assertion.
@@ -82,6 +82,15 @@ async fn adobe_connected_identities() {
8282 }
8383 ) ;
8484
85+ // Check the summary report for the entire manifest store.
86+ let ia_summary = IdentityAssertion :: summarize_from_reader ( & reader, & isv) . await ;
87+ let ia_json = serde_json:: to_string ( & ia_summary) . unwrap ( ) ;
88+
89+ assert_eq ! (
90+ ia_json,
91+ r#"{"urn:uuid:b55062ef-96b6-4f6e-bb7d-9c415f130471":[{"sig_type":"cawg.identity_claims_aggregation","referenced_assertions":["c2pa.hash.data"],"named_actor":{"@context":["https://www.w3.org/ns/credentials/v2","https://creator-assertions.github.io/tbd/tbd"],"type":["VerifiableCredential","IdentityClaimsAggregationCredential"],"issuer":"did:web:connected-identities.identity-stage.adobe.com","validFrom":"2024-10-03T21:47:02Z","verifiedIdentities":[{"type":"cawg.social_media","username":"Robert Tiles","uri":"https://net.s2stagehance.com/roberttiles","verifiedAt":"2024-09-24T18:15:11Z","provider":{"id":"https://behance.net","name":"behance"}}],"credentialSchema":[{"id":"https://creator-assertions.github.io/schemas/v1/creator-identity-assertion.json","type":"JSONSchema"}]}}]}"#
92+ ) ;
93+
8594 // Check the summary report for this manifest.
8695 let ia_summary = IdentityAssertion :: summarize_all ( manifest, & isv) . await ;
8796 let ia_json = serde_json:: to_string ( & ia_summary) . unwrap ( ) ;
@@ -91,3 +100,25 @@ async fn adobe_connected_identities() {
91100 r#"[{"sig_type":"cawg.identity_claims_aggregation","referenced_assertions":["c2pa.hash.data"],"named_actor":{"@context":["https://www.w3.org/ns/credentials/v2","https://creator-assertions.github.io/tbd/tbd"],"type":["VerifiableCredential","IdentityClaimsAggregationCredential"],"issuer":"did:web:connected-identities.identity-stage.adobe.com","validFrom":"2024-10-03T21:47:02Z","verifiedIdentities":[{"type":"cawg.social_media","username":"Robert Tiles","uri":"https://net.s2stagehance.com/roberttiles","verifiedAt":"2024-09-24T18:15:11Z","provider":{"id":"https://behance.net","name":"behance"}}],"credentialSchema":[{"id":"https://creator-assertions.github.io/schemas/v1/creator-identity-assertion.json","type":"JSONSchema"}]}}]"#
92101 ) ;
93102}
103+
104+ #[ cfg_attr( not( target_arch = "wasm32" ) , tokio:: test) ]
105+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
106+ async fn ims_multiple_manifests ( ) {
107+ let format = "image/jpeg" ;
108+ let test_image = include_bytes ! ( "../fixtures/claim_aggregation/ims_multiple_manifests.jpg" ) ;
109+
110+ let mut test_image = Cursor :: new ( test_image) ;
111+
112+ let reader = Reader :: from_stream ( format, & mut test_image) . unwrap ( ) ;
113+ assert_eq ! ( reader. validation_status( ) , None ) ;
114+
115+ // Check the summary report for the entire manifest store.
116+ let isv = IcaSignatureVerifier { } ;
117+ let ia_summary = IdentityAssertion :: summarize_from_reader ( & reader, & isv) . await ;
118+ let ia_json = serde_json:: to_string ( & ia_summary) . unwrap ( ) ;
119+
120+ assert_eq ! (
121+ ia_json,
122+ r#"{"urn:uuid:7256ca36-2a90-44ec-914d-f17c8d70c31f":[{"sig_type":"cawg.identity_claims_aggregation","referenced_assertions":["c2pa.hash.data"],"named_actor":{"@context":["https://www.w3.org/ns/credentials/v2","https://creator-assertions.github.io/tbd/tbd"],"type":["VerifiableCredential","IdentityClaimsAggregationCredential"],"issuer":"did:web:connected-identities.identity-stage.adobe.com","validFrom":"2025-02-13T00:40:47Z","verifiedIdentities":[{"type":"cawg.social_media","username":"firstlast555","uri":"https://net.s2stagehance.com/firstlast555","verifiedAt":"2025-01-10T19:53:59Z","provider":{"id":"https://behance.net","name":"behance"}}],"credentialSchema":[{"id":"https://cawg.io/schemas/v1/creator-identity-assertion.json","type":"JSONSchema"}]}}],"urn:uuid:b55062ef-96b6-4f6e-bb7d-9c415f130471":[{"sig_type":"cawg.identity_claims_aggregation","referenced_assertions":["c2pa.hash.data"],"named_actor":{"@context":["https://www.w3.org/ns/credentials/v2","https://creator-assertions.github.io/tbd/tbd"],"type":["VerifiableCredential","IdentityClaimsAggregationCredential"],"issuer":"did:web:connected-identities.identity-stage.adobe.com","validFrom":"2024-10-03T21:47:02Z","verifiedIdentities":[{"type":"cawg.social_media","username":"Robert Tiles","uri":"https://net.s2stagehance.com/roberttiles","verifiedAt":"2024-09-24T18:15:11Z","provider":{"id":"https://behance.net","name":"behance"}}],"credentialSchema":[{"id":"https://creator-assertions.github.io/schemas/v1/creator-identity-assertion.json","type":"JSONSchema"}]}}]}"#
123+ ) ;
124+ }
0 commit comments