diff --git a/integration/credentials_testdata.go b/integration/credentials_testdata.go index 79d9042d76bd1eea9f015abaeff2df7a9c18a328..1048bc3deeba008833fe00220d9be50d14492091 100644 --- a/integration/credentials_testdata.go +++ b/integration/credentials_testdata.go @@ -2,20 +2,24 @@ package integration var credentialWithSubjectID = ` { - "@context": - [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "type": "VerifiableCredential", - "issuer": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T19:23:24Z", - "credentialSubject": - { - "id":"did:web:example.com", - "allow":true + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "id": "http://example.edu/credentials/3732", + "type": ["VerifiableCredential", "UniversityDegreeCredential"], + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "issuanceDate": "2010-01-01T00:00:00Z", + "credentialSubject": { + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "allow": true, + "num": 123, + "array": { + "txt1": "1", + "txt2": "2" } + } }` var credentialWithoutSubjectID = ` @@ -27,7 +31,7 @@ var credentialWithoutSubjectID = ` "https://schema.org" ], "type": "VerifiableCredential", - "issuer": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "issuanceDate": "2010-01-01T19:23:24Z", "credentialSubject": { diff --git a/integration/internal/client/signer.go b/integration/internal/client/signer.go index 9e7fa3677923db5f3a8b5959841794bba6f38708..398b429feff15d722b6fe1fba5c8ae1cfb8f3a7b 100644 --- a/integration/internal/client/signer.go +++ b/integration/internal/client/signer.go @@ -23,8 +23,9 @@ func (s *Signer) CreateCredentialProof(vc []byte) ([]byte, error) { } payload := map[string]interface{}{ + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "namespace": "transit", - "key": "key2", + "key": "key1", "credential": cred, } @@ -90,9 +91,9 @@ func (s *Signer) CreatePresentationProof(vp []byte) ([]byte, error) { } payload := map[string]interface{}{ - "issuer": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "namespace": "transit", - "key": "key2", + "key": "key1", "presentation": pres, } diff --git a/integration/presentations_testdata.go b/integration/presentations_testdata.go index bc3dbef0971f249aae04069cc8337e7831f3fc64..607fa2e6ff159b543c21cd68ca818e5e3f716726 100644 --- a/integration/presentations_testdata.go +++ b/integration/presentations_testdata.go @@ -1,34 +1,76 @@ package integration +// var presentationWithSubjectID = ` +// { +// "@context": +// [ +// "https://www.w3.org/2018/credentials/v1", +// "https://w3id.org/security/suites/jws-2020/v1", +// "https://schema.org" +// ], +// "id": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", +// "type": "VerifiablePresentation", +// "verifiableCredential": +// [ +// { +// "@context": +// [ +// "https://www.w3.org/2018/credentials/v1", +// "https://schema.org" +// ], +// "id": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", +// "type": "VerifiableCredential", +// "issuer": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", +// "issuanceDate": "2010-01-01T19:23:24Z", +// "credentialSubject": +// { +// "id":"did:web:example.com", +// "allow": true +// } +// } +// ] +// }` + var presentationWithSubjectID = ` { - "@context": - [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "id": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": - [ - { - "@context": - [ - "https://www.w3.org/2018/credentials/v1", - "https://schema.org" - ], - "id": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential", - "issuer": "did:web:4db4-85-196-181-2.eu.ngrok.io:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T19:23:24Z", - "credentialSubject": - { - "id":"did:web:example.com", - "allow": true - } - } - ] + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "citizenship": "France", + "age_over": 18, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + }, + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] }` var presentationWithoutSubjectID = `