Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

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

Open
dmitrizagidulin opened this issue Aug 1, 2017 · 0 comments
Open

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

dmitrizagidulin opened this issue Aug 1, 2017 · 0 comments

Comments

@dmitrizagidulin
Copy link
Member

dmitrizagidulin commented Aug 1, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant