jolocom / jolocom-lib

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

Moved all validation logic for JSONWebTokens to validateJWT #358

Closed Exulansis closed 5 years ago

Exulansis commented 5 years ago

Description

Currently, the validation of a token's expiry date happens when it is decoded / used to instantiate a JSONWebToken class. Other validation logic (i.e. signature, nonce, aud) happens in identityWallet.validateJWT.

We can move the check for the expiry date to the aforementioned function as well, this way expired tokens can still be decoded for debugging purposes, and all validation logic is delegated to the validateJWT function.