diff --git a/credential/manifest/model.go b/credential/manifest/model.go index 9f7e0c54..40f17835 100644 --- a/credential/manifest/model.go +++ b/credential/manifest/model.go @@ -93,7 +93,7 @@ type CredentialApplicationWrapper struct { type CredentialApplication struct { ID string `json:"id" validate:"required"` SpecVersion string `json:"spec_version" validate:"required"` - Applicant string `json:"applicant"` + Applicant string `json:"applicant" validate:"required"` ManifestID string `json:"manifest_id" validate:"required"` Format *exchange.ClaimFormat `json:"format" validate:"required,dive"` // Must be present if the corresponding manifest contains a presentation_definition diff --git a/credential/manifest/testdata/full-application.json b/credential/manifest/testdata/full-application.json index cfde3ea7..441856a8 100644 --- a/credential/manifest/testdata/full-application.json +++ b/credential/manifest/testdata/full-application.json @@ -1,6 +1,7 @@ { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "spec_version": "https://identity.foundation/credential-manifest/spec/v1.0.0/", + "applicant": "did:example:123", "manifest_id": "WA-DL-CLASS-A", "format": { "ldp_vc": { diff --git a/example/manifest/manifest.go b/example/manifest/manifest.go index bcde32b0..f6ef8dae 100644 --- a/example/manifest/manifest.go +++ b/example/manifest/manifest.go @@ -224,6 +224,10 @@ func prepareCredentialApplication(cm manifest.CredentialManifest, vc credential. return nil, err } + if err := builder.SetApplicantID("did:example:123"); err != nil { + return nil, err + } + format := string(exchange.JWTVC) if err := builder.SetPresentationSubmission(exchange.PresentationSubmission{ ID: uuid.NewString(), diff --git a/example/usecase/steel_thread/testdata/ca.json b/example/usecase/steel_thread/testdata/ca.json index e1d9e38e..9e1294a6 100644 --- a/example/usecase/steel_thread/testdata/ca.json +++ b/example/usecase/steel_thread/testdata/ca.json @@ -2,6 +2,7 @@ "id": "c0c6e312-ad44-4f18-935e-a6efaad91612", "spec_version": "https://identity.foundation/credential-manifest/spec/v1.0.0/", "manifest_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", + "applicant" : "did:example:123", "format": { "jwt_vc": { "alg": [