diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e7e95e8a2..7984ef9820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - WACI Presentation - Credential Manifest support & minor improvements - Aries RFCs / Interop - - Web-redirect support in issue-credential and present-proof protocols (V2 and V3) + - web-redirect support in issue-credential and present-proof protocols (V2 and V3) - Media type profile support - Various minor fixes - Fixes and improvements to Crypto, KMS, VDR, Verifiable Credential, Storage, and other components diff --git a/cmd/aries-agent-mobile/pkg/wrappers/command/outofband_test.go b/cmd/aries-agent-mobile/pkg/wrappers/command/outofband_test.go index c063d22a98..080fe2eb93 100644 --- a/cmd/aries-agent-mobile/pkg/wrappers/command/outofband_test.go +++ b/cmd/aries-agent-mobile/pkg/wrappers/command/outofband_test.go @@ -124,7 +124,7 @@ func TestOutOfBand_CreateInvitation(t *testing.T) { mockResponse := `{"invitation":{"@id":"2429a5d3-c500-4647-9bb5-e34207bce406", "@type":"https://didcomm.org/out-of-band/1.0/invitation","label":"label","goal":"goal", -"goal-code":"goal_code","service":["s1"],"protocols":["s1"]}} +"goal_code":"goal_code","service":["s1"],"protocols":["s1"]}} ` fakeHandler := mockCommandRunner{data: []byte(mockResponse)} controller.handlers[outofband.CreateInvitation] = fakeHandler.exec diff --git a/cmd/aries-agent-mobile/pkg/wrappers/command/outofbandv2_test.go b/cmd/aries-agent-mobile/pkg/wrappers/command/outofbandv2_test.go index 306a6c71ce..ba9b441bb1 100644 --- a/cmd/aries-agent-mobile/pkg/wrappers/command/outofbandv2_test.go +++ b/cmd/aries-agent-mobile/pkg/wrappers/command/outofbandv2_test.go @@ -56,7 +56,7 @@ func TestOutOfBandV2_CreateInvitation(t *testing.T) { mockResponse := `{"invitation":{"@id":"2429a5d3-c500-4647-9bb5-e34207bce406", "@type":"https://didcomm.org/out-of-band/2.0/invitation","label":"label","body":{ -"goal":"goal","goal-code":"goal_code","accept":["didcomm/v2"]}}} +"goal":"goal","goal_code":"goal_code","accept":["didcomm/v2"]}}} ` fakeHandler := mockCommandRunner{data: []byte(mockResponse)} controller.handlers[outofbandv2.CreateInvitation] = fakeHandler.exec diff --git a/cmd/aries-agent-mobile/pkg/wrappers/rest/outofband_test.go b/cmd/aries-agent-mobile/pkg/wrappers/rest/outofband_test.go index 2d19304a06..f4371545c3 100644 --- a/cmd/aries-agent-mobile/pkg/wrappers/rest/outofband_test.go +++ b/cmd/aries-agent-mobile/pkg/wrappers/rest/outofband_test.go @@ -136,7 +136,7 @@ func TestOutOfBand_CreateInvitation(t *testing.T) { reqData := `{"label":"label","goal":"goal","goal_code":"goal_code","service":["s1"],"protocols":["s1"]}` mockResponse := `{"invitation":{"@id":"2429a5d3-c500-4647-9bb5-e34207bce406", "@type":"https://didcomm.org/out-of-band/1.0/invitation","label":"label","goal":"goal", -"goal-code":"goal_code","service":["s1"],"protocols":["s1"]}} +"goal_code":"goal_code","service":["s1"],"protocols":["s1"]}} ` controller.httpClient = &mockHTTPClient{ @@ -160,7 +160,7 @@ func TestOutOfBand_CreateRequest(t *testing.T) { reqData := `{"label":"label","goal":"goal","goal_code":"goal_code","service":["s1"], "attachments":[{"lastmod_time":"0001-01-01T00:00:00Z","data":{}}]}` mockResponse := `{"invitation":{"@id":"26169718-f261-48f1-addd-67018977a89f", -"@type":"https://didcomm.org/out-of-band/1.0/invitation","label":"label","goal":"goal","goal-code":"goal_code", +"@type":"https://didcomm.org/out-of-band/1.0/invitation","label":"label","goal":"goal","goal_code":"goal_code", "request~attach":[{"lastmod_time":"0001-01-01T00:00:00Z","data":{}}],"service":["s1"]}}` controller.httpClient = &mockHTTPClient{ diff --git a/pkg/didcomm/protocol/introduce/models.go b/pkg/didcomm/protocol/introduce/models.go index af024f858e..f4649a95ce 100644 --- a/pkg/didcomm/protocol/introduce/models.go +++ b/pkg/didcomm/protocol/introduce/models.go @@ -17,7 +17,7 @@ type Proposal struct { Thread *decorator.Thread `json:"~thread,omitempty"` Timing *decorator.Timing `json:"~timing,omitempty"` Goal string `json:"goal,omitempty"` - GoalCode string `json:"goal-code,omitempty"` + GoalCode string `json:"goal_code,omitempty"` } // To introducee descriptor keeps information about the introduction diff --git a/pkg/didcomm/protocol/issuecredential/params_test.go b/pkg/didcomm/protocol/issuecredential/params_test.go index 8ed35e651a..3e2005ce2c 100644 --- a/pkg/didcomm/protocol/issuecredential/params_test.go +++ b/pkg/didcomm/protocol/issuecredential/params_test.go @@ -18,7 +18,7 @@ import ( const ( commentText = "this is a comment" - goalCodeText = "goal-code" + goalCodeText = "goal_code" messageIDText = "message-id-123" ) @@ -47,7 +47,7 @@ func previewCredV3(t *testing.T) map[string]interface{} { Type: CredentialPreviewMsgTypeV3, ID: "bar-baz-qux", Body: IssueCredentialV3Body{ - GoalCode: "goal-code", + GoalCode: "goal_code", ReplacementID: "blah-id", Comment: commentText, }, diff --git a/pkg/didcomm/protocol/outofbandv2/models.go b/pkg/didcomm/protocol/outofbandv2/models.go index eebd371748..02b3b007fe 100644 --- a/pkg/didcomm/protocol/outofbandv2/models.go +++ b/pkg/didcomm/protocol/outofbandv2/models.go @@ -21,6 +21,6 @@ type Invitation struct { // InvitationBody contains invitation's goal and accept headers. type InvitationBody struct { Goal string `json:"goal,omitempty"` - GoalCode string `json:"goal-code,omitempty"` + GoalCode string `json:"goal_code,omitempty"` Accept []string `json:"accept,omitempty"` } diff --git a/pkg/wallet/invitation.go b/pkg/wallet/invitation.go index c962682b24..4944acb222 100644 --- a/pkg/wallet/invitation.go +++ b/pkg/wallet/invitation.go @@ -40,7 +40,7 @@ type GenericInvitation struct { From string `json:"from,omitempty"` Label string `json:"label,omitempty"` Goal string `json:"goal,omitempty"` - GoalCode string `json:"goal-code,omitempty"` + GoalCode string `json:"goal_code,omitempty"` Services []interface{} `json:"services"` Accept []string `json:"accept,omitempty"` Protocols []string `json:"handshake_protocols,omitempty"` diff --git a/test/bdd/features/waci_issuance_didcomm_v1.feature b/test/bdd/features/waci_issuance_didcomm_v1.feature index b36e11282d..f8910a28c6 100644 --- a/test/bdd/features/waci_issuance_didcomm_v1.feature +++ b/test/bdd/features/waci_issuance_didcomm_v1.feature @@ -19,7 +19,7 @@ Feature: WACI Issuance (Go API, DIDComm V1 + Issue Credential V2) And "Holder" creates public DID for did method "sidetree" Then "Issuer" waits for public did to become available in sidetree for up to 10 seconds And "Holder" waits for public did to become available in sidetree for up to 10 seconds - Then "Issuer" creates an out-of-band-v1 invitation with streamlined-vc goal-code + Then "Issuer" creates an out-of-band-v1 invitation with streamlined-vc goal_code And "Issuer" sends the out-of-band-v1 invitation to "Holder" and they accept it Then "Holder" sends proposal credential V2 to the "Issuer" (WACI, DIDComm V1) And "Issuer" accepts a proposal V2 and sends an offer to the Holder (WACI, DIDComm V1) diff --git a/test/bdd/features/waci_issuance_didcomm_v2.feature b/test/bdd/features/waci_issuance_didcomm_v2.feature index d073ce05e5..0dd106ceaa 100644 --- a/test/bdd/features/waci_issuance_didcomm_v2.feature +++ b/test/bdd/features/waci_issuance_didcomm_v2.feature @@ -19,7 +19,7 @@ Feature: WACI Issuance (Go API, DIDComm V2 + Issue Credential V3) And "Holder" creates public DID for did method "sidetree" Then "Issuer" waits for public did to become available in sidetree for up to 10 seconds And "Holder" waits for public did to become available in sidetree for up to 10 seconds - Then "Issuer" creates an out-of-band-v2 invitation with streamlined-vc goal-code + Then "Issuer" creates an out-of-band-v2 invitation with streamlined-vc goal_code And "Issuer" sends the request to "Holder" and they accept it Then "Holder" sends proposal credential V3 to the "Issuer" (WACI) And "Issuer" accepts a proposal V3 and sends an offer to the Holder (WACI) diff --git a/test/bdd/pkg/waci/waci_issuance_didcomm_v1_sdk_steps.go b/test/bdd/pkg/waci/waci_issuance_didcomm_v1_sdk_steps.go index 54bbe6cf35..9a13682eed 100644 --- a/test/bdd/pkg/waci/waci_issuance_didcomm_v1_sdk_steps.go +++ b/test/bdd/pkg/waci/waci_issuance_didcomm_v1_sdk_steps.go @@ -76,7 +76,7 @@ func (i *IssuanceSDKDIDCommV1Steps) SetContext(ctx *context.BDDContext) { // RegisterSteps registers the BDD test steps on the suite. // Note that VC proofs are not checked in this test suite. func (i *IssuanceSDKDIDCommV1Steps) RegisterSteps(suite *godog.Suite) { - suite.Step(`^"([^"]*)" creates an out-of-band-v1 invitation with streamlined-vc goal-code$`, + suite.Step(`^"([^"]*)" creates an out-of-band-v1 invitation with streamlined-vc goal_code$`, i.createOOBV1WithStreamlinedVCGoalCode) suite.Step(`^"([^"]*)" sends the out-of-band-v1 invitation to "([^"]*)" and they accept it$`, i.acceptOOBV1Invitation) diff --git a/test/bdd/pkg/waci/waci_issuance_didcomm_v2_sdk_steps.go b/test/bdd/pkg/waci/waci_issuance_didcomm_v2_sdk_steps.go index 513af54624..e5adadce65 100644 --- a/test/bdd/pkg/waci/waci_issuance_didcomm_v2_sdk_steps.go +++ b/test/bdd/pkg/waci/waci_issuance_didcomm_v2_sdk_steps.go @@ -79,7 +79,7 @@ func (i *IssuanceSDKDIDCommV2Steps) SetContext(ctx *context.BDDContext) { // RegisterSteps registers the BDD test steps on the suite. // Note that VC proofs are not checked in this test suite. func (i *IssuanceSDKDIDCommV2Steps) RegisterSteps(suite *godog.Suite) { - suite.Step(`^"([^"]*)" creates an out-of-band-v2 invitation with streamlined-vc goal-code$`, + suite.Step(`^"([^"]*)" creates an out-of-band-v2 invitation with streamlined-vc goal_code$`, i.createOOBV2WithStreamlinedVCGoalCode) suite.Step(`^"([^"]*)" sends the request to "([^"]*)" and they accept it$`, i.acceptOOBV2Invitation) suite.Step(`^"([^"]*)" sends proposal credential V3 to the "([^"]*)" \(WACI\)$`, i.sendsProposalV3)