jolocom / jolocom-lib

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

Consolidate validation logic #357

Open mnzaki opened 5 years ago

mnzaki commented 5 years ago

Description

Currently in two places: utils/validation and identityWallet.validateJWT. Perhaps it needs a "Validator" class/interface of some sort? or perhaps just keep them as utils?

Note that the validation logic paths are the only ones that needs to be able to resolve non-jolo DIDs and so require a resolver function. Containing that requirement into a new class/interface can be helpful.

Part of #355

TODO