admin管理员组文章数量:1313289
I'm trying to make a node script verify a JWT token. I have the public key (it's a x.509 certificate) and the JWT.
I tried using but unfortunately it seems that they don't support x.509.
If you know of a package that verifies JWT tokens with x.509 certs I would appreciate it.
Thanks!
I'm trying to make a node script verify a JWT token. I have the public key (it's a x.509 certificate) and the JWT.
I tried using https://github./auth0/node-jsonwebtoken but unfortunately it seems that they don't support x.509.
If you know of a package that verifies JWT tokens with x.509 certs I would appreciate it.
Thanks!
Share Improve this question asked Mar 1, 2016 at 17:35 Y. BrahimiY. Brahimi 732 silver badges7 bronze badges 2- jsrsasign maybe? – Joachim Isaksson Commented Mar 1, 2016 at 17:49
- you can try the wrapper around jsjws – tergd1 Commented Mar 1, 2016 at 17:51
1 Answer
Reset to default 6JWT can be signed with public/private keys. The method you are looking for is this one: https://github./auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback
This tests show examples of how to use it:
https://github./auth0/node-jsonwebtoken/blob/master/test/jwt.rs.tests.js
You can also use http://jwt.io
本文标签: javascriptHow do you verify a JWT token with a x509 certificate in nodeStack Overflow
版权声明:本文标题:javascript - How do you verify a JWT token with a x.509 certificate in node? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741889165a2403198.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论