hyperledger / identus-edge-agent-sdk-ts

Apache License 2.0
15 stars 8 forks source link

feat(sdk-verification)!: Implementing DIF Presentation exchange protocol 2.0 for SDK to SDK OOB verification #196

Closed elribonazo closed 2 months ago

elribonazo commented 3 months ago

Description:

Implements verification on SDKS. ATL-6512

We are implementing the first version of the out of band verification which is used to verify credentials from one Wallet to Another, mobile => browser, browser => browser or mobile => mobile, following the Diff presentation exchange protocol v2.0

Have also covered the following scenarios:

  1. Verifying the Holder Presentation signature and checking that the credential is tight to the holder that signed the presentation.
  2. Verifying the Holder's credential issuer and its signature. Checking also that the DID's match and the keys used to sign are matching the ones in the long form did.
  3. Verifying all the credential fields are present.
  4. Verifying that the credential fields contain the correct values.

This PR introduces minor breaking changes in the JWT libraries which are now strongly typed and easier to manage, most user's won't be needing any change but we need to document the changes:

BREAKING CHANGES: JWT.fromJWT is deprecated in favor of using JWT.fromJWS. JWTCredential constructor now accepts a string with jws + revocation boolean as optional.

Checklist:

github-actions[bot] commented 2 months ago
Lines Statements Branches Functions
Coverage: 72%
72.77% (2072/2847) 61.53% (947/1539) 79.05% (570/721)

JUnit

Tests Skipped Failures Errors Time
434 6 :zzz: 0 :x: 0 :fire: 1m 5s :stopwatch:
elribonazo commented 2 months ago

@petevielhaber have solved all your comments in the last commit.

Thanks for the review! If u wanna give it a last check go ahead :)