jolocom / jolocom-lib

Library for interacting with the identity solution provided by Jolocom.
MIT License
24 stars 18 forks source link

JolocomLib.util.validateDigestable fails with '@context must be an object.' #285

Closed palinka closed 5 years ago

palinka commented 5 years ago

Describe the bug Although following https://jolocom-lib.readthedocs.io/en/latest/, JolocomLib.util.validateDigestable fails with above error.

I had the impression this did not happen before 19th of March, but can be reproduced 100% since then. Need to check eventual external dependencies for context..

Here more infos:

identityWallet.create.signedCredential returns an array for the context:

Screenshot from 2019-03-22 10-32-02

JolocomLib.parse.signedCredential return undefined as consequence for above:

Screenshot from 2019-03-22 10-32-20

To Reproduce I implemented a self-contained unit-test here.

Use yarn testSignatureValidation to execute.

Expected behavior A credential can be signed by JolocomLib.

TODO

palinka commented 5 years ago

json-ld was updated here: https://github.com/jolocom/jolocom-lib/commit/025364e73b43e21827ec1a9ebe2c1ab0243af75f

Maybe this is connected and did not bubble up, because

Maybe json-ld did not catch the undefined context in previous version.

chunningham commented 5 years ago

The JSON-LD spec does not specify what type the @context block should be and the VC spec has an example with an array. The JSON-LD library is not processing the context field properly I suspect.

Exulansis commented 5 years ago

Does this still need to be addressed? Otherwise I can close this.

Exulansis commented 5 years ago

@chunningham @mnzaki @VolkerSchiewe I am closing this issue for now, if this reoccurs in some way, this can be reopened.