-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate JWT with JWK #60
Comments
I figured out something: I have rewritten the function verify_rsa, adding the parameters n and e (JWK module and exponent)
|
I think you figured out the hardest part - figuring out how to make openssl do what you want. As far as the input parameters in the JWT header those should be pretty easy to pipe in here. I'm not an expert on JWK and didn't have the immediate need for it, hence it's not here. If you're interested I'm more than happy to accept a PR to add JWK support. I'm pretty swamped right now, but I can try to help out a bit. |
Hello:
I am using this library to validate a JWT token.
The problem I have is that I start from a JWK token:
The library allows you to validate the JWT token from a public key:
const char *rs_pub_key =
"-----BEGIN PUBLIC KEY-----\n"
.....
"-----END PUBLIC KEY-----";
i'm not sure how to convert the JWK token to public key in the c language. I have tried his online converter:
https://8gwifi.org/jwkconvertfunctions.jsp
and the JWT converted to public key works well with the library.
Could you give me some guidance to convert JWK to public key?
thanks.
The text was updated successfully, but these errors were encountered: