Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

refactor: A few refactoring of legacy-connection package #3342

Merged

Conversation

Abdulbois
Copy link
Contributor

Title:
Refactor legacy-connection package due to interoperability issues

Summary:

  • Add new legacy http header to handle legacy requests. Cover with unit tests
  • Encode invitation Recipient key to base58
  • Change embedded verification to referenced while creating verification methods
  • Add legacy file into doc package to convert DIDdoc to raw doc. Cover with unit test
  • Add handling DID id's where did method is not specified
  • Add JSONBytes and ParseConnection methods to use them while handling connection data
  • Change AckMsgType content to proper one
  • Add method to convert array of did-keys to base58 keys
  • Enable saving decryption key while handling envelope at connection-request state
  • Add new InvitationRecipientKeys into connection.Record model
  • Refactor requestMsgRecord, handleInboundRequest and prepareConnectionSignature methods and their unit-tests
  • Save Recipient keys while handling connection request
  • Use SaveDID instead SaveDIDByResolving

@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

Merging #3342 (f2d219e) into main (77fbef7) will decrease coverage by 0.00%.
The diff coverage is 85.16%.

@@            Coverage Diff             @@
##             main    #3342      +/-   ##
==========================================
- Coverage   87.90%   87.89%   -0.01%     
==========================================
  Files         328      330       +2     
  Lines       45336    45498     +162     
==========================================
+ Hits        39854    39992     +138     
- Misses       4061     4079      +18     
- Partials     1421     1427       +6     
Impacted Files Coverage Δ
pkg/didcomm/transport/http/outbound.go 81.94% <ø> (ø)
pkg/store/connection/connection_lookup.go 94.25% <ø> (ø)
...comm/dispatcher/inbound/inbound_message_handler.go 90.24% <36.36%> (-3.13%) ⬇️
pkg/didcomm/protocol/legacyconnection/models.go 72.09% <72.09%> (ø)
pkg/didcomm/protocol/legacyconnection/states.go 87.16% <80.00%> (-0.30%) ⬇️
pkg/doc/did/doc.go 86.98% <83.33%> (+0.36%) ⬆️
pkg/doc/did/legacy.go 92.77% <92.77%> (ø)
pkg/didcomm/protocol/legacyconnection/keys.go 88.46% <100.00%> (-0.22%) ⬇️
pkg/didcomm/protocol/legacyconnection/service.go 86.81% <100.00%> (+0.22%) ⬆️
pkg/didcomm/transport/http/inbound.go 81.44% <100.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Abdulbois Abdulbois force-pushed the legacy-connection-refactor branch 2 times, most recently from b5406b0 to 117ca57 Compare August 18, 2022 15:19
pkg/didcomm/transport/http/inbound_test.go Outdated Show resolved Hide resolved
pkg/doc/did/doc.go Outdated Show resolved Hide resolved
pkg/doc/did/legacy.go Show resolved Hide resolved
pkg/didcomm/protocol/legacyconnection/models.go Outdated Show resolved Hide resolved
@ashcherbakov
Copy link
Contributor

Are we planning to write an integration acceptance test in af-go that will check the interoperability between af-go legacy connection protocol and other implementations (VCX in particular)? Will a BDD test do these checks? Or we need another one?

@Abdulbois Abdulbois force-pushed the legacy-connection-refactor branch 3 times, most recently from 5f2040f to 047e747 Compare August 19, 2022 12:07
@Abdulbois Abdulbois closed this Aug 19, 2022
@Abdulbois Abdulbois reopened this Aug 19, 2022
@Abdulbois Abdulbois force-pushed the legacy-connection-refactor branch 2 times, most recently from 27871db to 83cf255 Compare August 22, 2022 06:38
@Abdulbois Abdulbois marked this pull request as ready for review August 22, 2022 06:40
@Abdulbois Abdulbois force-pushed the legacy-connection-refactor branch 2 times, most recently from 38ceb3e to 07cf93f Compare August 22, 2022 06:50
@Abdulbois Abdulbois closed this Aug 22, 2022
@Abdulbois Abdulbois reopened this Aug 22, 2022
@Abdulbois Abdulbois closed this Aug 22, 2022
@Abdulbois Abdulbois reopened this Aug 22, 2022
@Abdulbois Abdulbois closed this Aug 22, 2022
@Abdulbois Abdulbois reopened this Aug 22, 2022
@Abdulbois Abdulbois closed this Aug 22, 2022
@Abdulbois Abdulbois reopened this Aug 22, 2022
@Abdulbois Abdulbois closed this Aug 22, 2022
@Abdulbois Abdulbois reopened this Aug 22, 2022
@Abdulbois Abdulbois closed this Aug 22, 2022
@Abdulbois Abdulbois reopened this Aug 22, 2022
- Add new legacy http header to handle legacy requests. Cover with unit tests
- Encode invitation Recipient key to base58
- Change embedded verification to referenced while creating verification methods
- Add legacy file into doc package to convert DIDdoc to raw doc. Cover with unit test
- Add handling DID id's where did method is not specified
- Add JSONBytes and ParseConnection methods to use them while handling connection data
- Change AckMsgType content to proper one
- Add method to convert array of did-keys to base58 keys
- Enable saving decryption key while handling envelope at connection-request state
- Add new InvitationRecipientKeys into connection.Record model
- Refactor requestMsgRecord, handleInboundRequest and prepareConnectionSignature methods and their unit-tests
- Save Recipient keys while handling connection request
- Use SaveDID instead SaveDIDByResolving

Signed-off-by: Abdulbois <abdulbois.tursunov@avast.com>
@fqutishat fqutishat merged commit 07695f2 into hyperledger-archives:main Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants