-
Notifications
You must be signed in to change notification settings - Fork 32
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
Verify JWT with JWK set #4
Comments
bump? |
@FranklinYu Sorry for the delayed response to this. Yes, I agree with you that JWK sets should have first-class support. I'll see if I can get that together at some point. |
I'm trying to figure out how to use this library to do the same as OP, and in my tests, in classic red-green style, I am trying to generate the JWKS with @potatosalad Is this because
|
@pboling If using a static or derived # using existing key and a static 'kid'
old_key.generate_key().merge({'kid' => 'my_static_kid', 'use' => 'sig'})
# using params with a derived thumbprint 'kid'
jwk = JOSE::JWK.generate_key([:rsa, 4096])
jwk = jwk.merge({'kid' => jwk.thumbprint(), 'use' => 'sig'}) |
@potatosalad Thanks! That fixed the issue for me! I'll post up some example code to the wiki once I'm all green. I am using this library for key generation, and payload encoding, where the decoding is done with |
When verifying with JWK set, I have to manually loop through all the keys:
I hope I can just do
This has two benefits:
jwk
should beJOSE::JWK
.The text was updated successfully, but these errors were encountered: