QJsonWebToken icon indicating copy to clipboard operation
QJsonWebToken copied to clipboard

Is it possible to use public key to verify?

Open MadMax411 opened this issue 7 years ago • 5 comments

Giving is a jwt (ES256) and a public-key. I want to verify the signature like this debugger: https://jwt.io/ Or is it not possible with Qt?

MadMax411 avatar Feb 03 '17 11:02 MadMax411

Have you tried the included jwtverifier example? Doesn't it do what you want?

juangburgos avatar Feb 03 '17 11:02 juangburgos

Yes, but it don't work.

jwtverifier

MadMax411 avatar Feb 03 '17 12:02 MadMax411

I haven't tested with complex secret, might be that the public key you are trying to use as a secret contains some C++ unsafe characters or something like that. Good news is that the code is open source, and not very complicated. I guess you can easily debug that.

juangburgos avatar Feb 05 '17 15:02 juangburgos

From what I see, this project implements only HMAC. No PKI is available: no RSA, no Elliptic curves.

madf avatar Feb 06 '17 09:02 madf

Oh yes, indeed, that is the very first thing mentioned in the README.md file. I did this project for a simple use case. But feel free to extend it, I am sure other people would be interested!

juangburgos avatar Feb 06 '17 09:02 juangburgos