Creating RsaJsonWebKey with RSAPrivateKey
Issue #50
new
First, Thanks for the great library! it really helps allot.
now the actual problem is that I'd like to use the JwksDecryptionKeyResolver with private rsa keys. I see that the RsaJsonWebKey does not have a constructor from such object, it only has one from a map containing the various used numbers. For me that makes the library a bit cumbersome to use...
Thanks!
Comments (2)
-
repo owner -
repo owner - changed title to Creating RsaJsonWebKey with RSAPrivateKey
- Log in to comment
Try something like the below. Typically using the Factory on PublicJsonWebKey or JsonWebKey is the way to get a JsonWebKey instance. And you need the public part in JWK so that's what you give to the factory's method. Then use the setPrivateKey(...) to provide the object with the private key.