Open smof opened 9 years ago
Do you mean JWE? If so, I think agree and your pull-req will be welcome.
Sorry for the delay
@jfromaniello Hey, I have integrated JWE encryption within node-jsonwebtoken based on works of node-webtokens.
I have implemented modifications in sign.js which takes extra options key 'encrypt' to opt JWE automatically and verify.js is [WIP].
jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RSA-OAEP', encrypt: 'A256GCM' },function (err, signedToken) { console.log(signedToken); })
JWE uses crypto.js for content and key encryption which is included in lib, please check supported key management algorithms and content encryption algorithms here.
Do let me know if it looks good and I will raise a pull request for same.
Note, Work In Progress: jwt.verify()
Hi this would be good to support out of the box with NestJS 🙏
If a JWT is encrypted and not just signed, would be nice to have ability to decrypt the verified contents. If this is an RFE? If so could I patch