jose icon indicating copy to clipboard operation
jose copied to clipboard

Implement jwt.isSigned() helper method (or similar)

Open dmitrizagidulin opened this issue 6 years ago • 0 comments

It would be helpful for various app logic to have a JWT instance method, something like jwt.isSigned(), to be able to tell whether the jwt has one or multiple signatures (signed), or has alg: 'none' in the header (unsigned).

For the moment, you have to do something like if (jwt.signature || jwt.signatures) -- if (jwt.isSigned()) would be more readable.

dmitrizagidulin avatar Aug 01 '17 17:08 dmitrizagidulin